Beispiel #1
0
 /**
  * Analyse plugin paths
  * @param object $config the config container
  */
 protected function _loadPluginsPathList($config)
 {
     $list = App::getAllPluginsPath();
     foreach ($list as $k => $p) {
         if ($handle = opendir($p)) {
             while (false !== ($f = readdir($handle))) {
                 if ($f[0] != '.' && is_dir($p . $f)) {
                     if ($subdir = opendir($p . $f)) {
                         if ($k != 0 && $config->compilation['checkCacheFiletime']) {
                             $config->_allBasePath[] = $p . $f . '/';
                         }
                         while (false !== ($subf = readdir($subdir))) {
                             if ($subf[0] != '.' && is_dir($p . $f . '/' . $subf)) {
                                 if ($f == 'tpl') {
                                     $prop = '_tplpluginsPathList_' . $subf;
                                     if (!isset($config->{$prop})) {
                                         $config->{$prop} = array();
                                     }
                                     array_unshift($config->{$prop}, $p . $f . '/' . $subf . '/');
                                 } else {
                                     $prop = '_pluginsPathList_' . $f;
                                     $config->{$prop}[$subf] = $p . $f . '/' . $subf . '/';
                                 }
                             }
                         }
                         closedir($subdir);
                     }
                 }
             }
             closedir($handle);
         }
     }
 }
Beispiel #2
0
 public static function getAllPluginsPath()
 {
     return \Jelix\Core\App::getAllPluginsPath();
 }