Esempio n. 1
0
 /**
  * Loads an array of all package xml files (optionally of one type).
  */
 public static function loadProductXmlList($type = '', $typekey = false)
 {
     $rootDir = DIR . DIRECTORY_SEPARATOR . 'includes';
     $packagesDir = DIR . DIRECTORY_SEPARATOR . 'packages';
     $folders = vB_Api_Extensions::getPackages($packagesDir, $rootDir);
     $list = array();
     if ($folders) {
         foreach ($folders as $package) {
             if (strrpos($package, DIRECTORY_SEPARATOR)) {
                 $xmlDir = $package . DIRECTORY_SEPARATOR . 'xml';
             } else {
                 $xmlDir = $packagesDir . DIRECTORY_SEPARATOR . $package . DIRECTORY_SEPARATOR . 'xml';
             }
             $res = self::loadProductXml($xmlDir, $package, $type, $typekey);
             $list = array_merge($list, $res);
         }
     }
     return $list;
 }