예제 #1
0
 /**
  * Get default server information and prepare chmod info
  */
 public function before()
 {
     $this->phpVersion = phpversion();
     $this->pdo = extension_loaded('pdo');
     $this->gd = extension_loaded('gd') && function_exists('gd_info');
     // autoload is disabled, lets get chmod file & dirs from console app data
     File::inc('/Apps/Controller/Console/Main.php');
     $this->_chmodDirs = Main::$installDirs;
     // for each file or directory in list - check permissions
     foreach ($this->_chmodDirs as $object) {
         if (Str::endsWith('.php', $object)) {
             // sounds like a file
             $this->chmodCheck[$object] = File::exist($object) && File::writable($object);
         } else {
             $this->chmodCheck[$object] = Directory::exist($object) && Directory::writable($object);
         }
     }
 }