Esempio n. 1
0
 /**
  * VQMod::bootup()
  *
  * @param bool $path File path to use
  * @param bool $logging Enable/disabled logging
  * @return null
  * @description Startup of VQMod
  */
 public static function bootup($path = false, $logging = true)
 {
     if (!class_exists('DOMDocument')) {
         die('VQMod::bootup - ERROR - YOU NEED THE PHP "DOMDocument" EXTENSION INSTALLED TO USE VQMod');
     }
     if (strtoupper(substr(PHP_OS, 0, 3)) == 'WIN') {
         self::$windows = true;
     }
     self::$directorySeparator = defined('DIRECTORY_SEPARATOR') ? DIRECTORY_SEPARATOR : '/';
     if (!$path) {
         $path = dirname(dirname(__FILE__));
     }
     self::_setCwd($path);
     self::$logging = (bool) $logging;
     self::$log = new VQModLog();
     $replacesPath = self::path(self::$pathReplaces);
     $replaces = array();
     if ($replacesPath) {
         include_once $replacesPath;
         self::$_lastModifiedTime = filemtime($replacesPath);
     }
     self::$_replaces = !is_array($replaces) ? array() : $replaces;
     self::_getMods();
     self::_loadProtected();
 }