50 {
52
53 if (isset($args[0]) && !empty($args[0]) && isset($args[1]) && !empty($args[1])) {
54 $this->pathsToScan = array();
55 $this->version = $args[1];
56
61 $this->changePort = true;
63 foreach ($folderList as $folder) {
64 $this->pathsToScan[] = array(
65 'path' =>
$bearsamppBins->getApache()->getRootPath() .
'/' . $folder,
66 'includes' => array('.ini', '.conf'),
67 'recursive' => true
68 );
69 }
74 $this->changePort = false;
76 foreach ($folderList as $folder) {
77 $this->pathsToScan[] = array(
79 'includes' => array('.php', '.bat', '.ini', '.reg', '.inc'),
80 'recursive' => true
81 );
82 }
87 $this->changePort = true;
89 foreach ($folderList as $folder) {
90 $this->pathsToScan[] = array(
91 'path' =>
$bearsamppBins->getMysql()->getRootPath() .
'/' . $folder,
92 'includes' => array('my.ini'),
93 'recursive' => false
94 );
95 }
98 $this->currentVersion =
$bearsamppBins->getMariadb()->getVersion();
100 $this->changePort = true;
102 foreach ($folderList as $folder) {
103 $this->pathsToScan[] = array(
104 'path' =>
$bearsamppBins->getMariadb()->getRootPath() .
'/' . $folder,
105 'includes' => array('my.ini'),
106 'recursive' => false
107 );
108 }
109 } elseif ($args[0] ==
$bearsamppBins->getPostgresql()->getName()) {
111 $this->currentVersion =
$bearsamppBins->getPostgresql()->getVersion();
113 $this->changePort = true;
115 foreach ($folderList as $folder) {
116 $this->pathsToScan[] = array(
117 'path' =>
$bearsamppBins->getPostgresql()->getRootPath() .
'/' . $folder,
118 'includes' => array('.ber', '.conf', '.bat'),
119 'recursive' => true
120 );
121 }
124 $this->currentVersion =
$bearsamppBins->getNodejs()->getVersion();
125 $this->service = null;
126 $this->changePort = false;
128 foreach ($folderList as $folder) {
129 $this->pathsToScan[] = array(
130 'path' =>
$bearsamppBins->getNodejs()->getRootPath() .
'/' . $folder .
'/etc',
131 'includes' => array('npmrc'),
132 'recursive' => true
133 );
134 $this->pathsToScan[] = array(
135 'path' =>
$bearsamppBins->getNodejs()->getRootPath() .
'/' . $folder .
'/node_modules/npm',
136 'includes' => array('npmrc'),
137 'recursive' => false
138 );
139 }
140 } elseif ($args[0] ==
$bearsamppBins->getMemcached()->getName()) {
142 $this->currentVersion =
$bearsamppBins->getMemcached()->getVersion();
144 $this->changePort = true;
147 $this->currentVersion =
$bearsamppBins->getMailpit()->getVersion();
149 $this->changePort = false;
151 foreach ($folderList as $folder) {
152 $this->pathsToScan[] = array(
153 'path' =>
$bearsamppBins->getMailpit()->getRootPath() .
'/' . $folder,
154 'includes' => array('.conf'),
155 'recursive' => true
156 );
157 }
160 $this->currentVersion =
$bearsamppBins->getXlight()->getVersion();
162 $this->changePort = true;
164 foreach ($folderList as $folder) {
165 $this->pathsToScan[] = array(
166 'path' =>
$bearsamppBins->getXlight()->getRootPath() .
'/' . $folder,
167 'includes' => array('.conf, ftpd.hosts, ftpd.option, ftpd.password, ftpd.rules, ftpd.users, .ini'),
168 'recursive' => true
169 );
170 }
171 }
172
174
175
176 $this->bearsamppSplash = new Splash();
177 $this->bearsamppSplash->init(
178 $this->boxTitle,
179 self::GAUGE_SERVICES * count(
$bearsamppBins->getServices()) + self::GAUGE_OTHERS,
180 $this->boxTitle
181 );
182
183 $bearsamppWinbinder->setHandler($this->bearsamppSplash->getWbWindow(), $this, 'processWindow', 1000);
184 $bearsamppWinbinder->mainLoop();
185 $bearsamppWinbinder->reset();
186 }
187 }
const SWITCH_VERSION_TITLE
static getFolderList($path)