68 {
70
71 if (isset($args[0]) && !empty($args[0]) && isset($args[1]) && !empty($args[1])) {
72 $this->pathsToScan = array();
73 $this->version = $args[1];
74
79 $this->changePort = true;
81 foreach ($folderList as $folder) {
82 $this->pathsToScan[] = array(
84 'includes' => array('.ini', '.conf'),
85 'recursive' => true
86 );
87 }
92 $this->changePort = false;
94 foreach ($folderList as $folder) {
95 $this->pathsToScan[] = array(
97 'includes' => array('.php', '.bat', '.ini', '.reg', '.inc'),
98 'recursive' => true
99 );
100 }
105 $this->changePort = true;
107 foreach ($folderList as $folder) {
108 $this->pathsToScan[] = array(
110 'includes' => array('my.ini'),
111 'recursive' => false
112 );
113 }
116 $this->currentVersion =
$bearsamppBins->getMariadb()->getVersion();
118 $this->changePort = true;
120 foreach ($folderList as $folder) {
121 $this->pathsToScan[] = array(
123 'includes' => array('my.ini'),
124 'recursive' => false
125 );
126 }
127 } elseif ($args[0] ==
$bearsamppBins->getPostgresql()->getName()) {
129 $this->currentVersion =
$bearsamppBins->getPostgresql()->getVersion();
131 $this->changePort = true;
133 foreach ($folderList as $folder) {
134 $this->pathsToScan[] = array(
136 'includes' => array('.conf', '.bat'),
137 'recursive' => true
138 );
139 }
142 $this->currentVersion =
$bearsamppBins->getNodejs()->getVersion();
143 $this->service = null;
144 $this->changePort = false;
146 foreach ($folderList as $folder) {
147 $this->pathsToScan[] = array(
149 'includes' => array('npmrc'),
150 'recursive' => true
151 );
152 $this->pathsToScan[] = array(
154 'includes' => array('npmrc'),
155 'recursive' => false
156 );
157 }
158 } elseif ($args[0] ==
$bearsamppBins->getMemcached()->getName()) {
160 $this->currentVersion =
$bearsamppBins->getMemcached()->getVersion();
162 $this->changePort = true;
165 $this->currentVersion =
$bearsamppBins->getMailpit()->getVersion();
167 $this->changePort = false;
169 foreach ($folderList as $folder) {
170 $this->pathsToScan[] = array(
172 'includes' => array('.conf'),
173 'recursive' => true
174 );
175 }
178 $this->currentVersion =
$bearsamppBins->getXlight()->getVersion();
180 $this->changePort = true;
182 foreach ($folderList as $folder) {
183 $this->pathsToScan[] = array(
185 'includes' => array('.conf, ftpd.hosts, ftpd.option, ftpd.password, ftpd.rules, ftpd.users, .ini'),
186 'recursive' => true
187 );
188 }
189 }
190
192
193
194 $this->bearsamppSplash = new Splash();
195 $this->bearsamppSplash->init(
196 $this->boxTitle,
197 self::GAUGE_SERVICES * count(
$bearsamppBins->getServices()) + self::GAUGE_OTHERS,
198 $this->boxTitle
199 );
200
201 $bearsamppWinbinder->setHandler($this->bearsamppSplash->getWbWindow(), $this, 'processWindow', 1000);
202 $bearsamppWinbinder->mainLoop();
203 $bearsamppWinbinder->reset();
204 }
205 }
const SWITCH_VERSION_TITLE
static getModuleRootPath($module)
static getFolderList($path)