34 {
36
37 if (isset($args[0]) && !empty($args[0]) && isset($args[1]) && !empty($args[1])) {
38 $this->pathsToScan = array();
39 $this->version = $args[1];
40
45 $this->changePort = true;
47 foreach ($folderList as $folder) {
48 $this->pathsToScan[] = array(
49 'path' =>
$bearsamppBins->getApache()->getRootPath() .
'/' . $folder,
50 'includes' => array('.ini', '.conf'),
51 'recursive' => true
52 );
53 }
58 $this->changePort = false;
60 foreach ($folderList as $folder) {
61 $this->pathsToScan[] = array(
63 'includes' => array('.php', '.bat', '.ini', '.reg', '.inc'),
64 'recursive' => true
65 );
66 }
71 $this->changePort = true;
73 foreach ($folderList as $folder) {
74 $this->pathsToScan[] = array(
75 'path' =>
$bearsamppBins->getMysql()->getRootPath() .
'/' . $folder,
76 'includes' => array('my.ini'),
77 'recursive' => false
78 );
79 }
82 $this->currentVersion =
$bearsamppBins->getMariadb()->getVersion();
84 $this->changePort = true;
86 foreach ($folderList as $folder) {
87 $this->pathsToScan[] = array(
88 'path' =>
$bearsamppBins->getMariadb()->getRootPath() .
'/' . $folder,
89 'includes' => array('my.ini'),
90 'recursive' => false
91 );
92 }
93 } elseif ($args[0] ==
$bearsamppBins->getPostgresql()->getName()) {
95 $this->currentVersion =
$bearsamppBins->getPostgresql()->getVersion();
97 $this->changePort = true;
99 foreach ($folderList as $folder) {
100 $this->pathsToScan[] = array(
101 'path' =>
$bearsamppBins->getPostgresql()->getRootPath() .
'/' . $folder,
102 'includes' => array('.ber', '.conf', '.bat'),
103 'recursive' => true
104 );
105 }
108 $this->currentVersion =
$bearsamppBins->getNodejs()->getVersion();
109 $this->service = null;
110 $this->changePort = false;
112 foreach ($folderList as $folder) {
113 $this->pathsToScan[] = array(
114 'path' =>
$bearsamppBins->getNodejs()->getRootPath() .
'/' . $folder .
'/etc',
115 'includes' => array('npmrc'),
116 'recursive' => true
117 );
118 $this->pathsToScan[] = array(
119 'path' =>
$bearsamppBins->getNodejs()->getRootPath() .
'/' . $folder .
'/node_modules/npm',
120 'includes' => array('npmrc'),
121 'recursive' => false
122 );
123 }
124 } elseif ($args[0] ==
$bearsamppBins->getFilezilla()->getName()) {
126 $this->currentVersion =
$bearsamppBins->getFilezilla()->getVersion();
128 $this->changePort = true;
130 foreach ($folderList as $folder) {
131 $this->pathsToScan[] = array(
132 'path' =>
$bearsamppBins->getFilezilla()->getRootPath() .
'/' . $folder,
133 'includes' => array('.xml'),
134 'recursive' => true
135 );
136 }
137 } elseif ($args[0] ==
$bearsamppBins->getMemcached()->getName()) {
139 $this->currentVersion =
$bearsamppBins->getMemcached()->getVersion();
141 $this->changePort = true;
142 }
143
145
146
147 $this->bearsamppSplash =
new Splash();
148 $this->bearsamppSplash->init(
149 $this->boxTitle,
150 self::GAUGE_SERVICES * count(
$bearsamppBins->getServices()) + self::GAUGE_OTHERS,
151 $this->boxTitle
152 );
153
154 $bearsamppWinbinder->setHandler($this->bearsamppSplash->getWbWindow(), $this, 'processWindow', 1000);
155 $bearsamppWinbinder->mainLoop();
156 $bearsamppWinbinder->reset();
157 }
158 }
const SWITCH_VERSION_TITLE
static getFolderList($path)