Пример #1
0
 public static function deployVendors()
 {
     $webRscPath = realpath(_::getConfig("WEB_RSC_PATH"));
     if (file_exists(POKELIO_ROOT_PATH . '/Vendors')) {
         Pokelio_File::makedir($webRscPath . '/Vendors');
         Pokelio_File::copyDir(POKELIO_ROOT_PATH . '/Vendors', $webRscPath . '/Vendors');
     }
 }
Пример #2
0
 public static function view($templateSrc, $templateName, $moduleName)
 {
     $viewPath = _::getConfig("APP_VIEW_PATH");
     $cache = _::getConfig('USYNTAX_CACHE');
     $viewFile = $templateSrc;
     Pokelio_File::makedir($viewPath . '/' . $moduleName);
     $procViewFile = $viewPath . '/' . $moduleName . '/' . $templateName . 'Template.php';
     if (file_exists($procViewFile)) {
         if (filemtime($viewFile) > filemtime($procViewFile) || $cache == false) {
             self::processView($viewFile, $procViewFile);
         }
     } else {
         self::processView($viewFile, $procViewFile);
     }
     return $procViewFile;
 }
Пример #3
0
 public static function copyDir($srcDir, $trgDir, $cleanFirst = false)
 {
     $permissions = Pokelio_Global::getConfig('CREATED_FILE_PERMISSIONS', 'Pokelio');
     $permissions = intval($permissions, 8);
     if ($cleanFirst == true && file_exists($trgDir)) {
         self::rmDir($trgDir);
     }
     Pokelio_File::makedir($trgDir);
     $entries = scandir($srcDir);
     foreach ($entries as $entry) {
         if (substr($entry, 0, 1) != '.') {
             $pathEntry = $srcDir . '/' . $entry;
             if (is_file($pathEntry)) {
                 copy($pathEntry, $trgDir . '/' . $entry);
             }
             if (is_dir($pathEntry)) {
                 Pokelio_File::copyDir($pathEntry, $trgDir . '/' . $entry);
             }
             chmod($trgDir . '/' . $entry, $permissions);
         }
     }
 }