示例#1
0
 /**
  *  Import all .php file found on $path recursively
  *
  * @param $path  string
  */
 function importRecursive($path)
 {
     $cwd = dir($path);
     // Import all file in current directory
     VPackageHelper::importAll($path);
     // recursive directory
     while (($entry = $cwd->read()) !== false) {
         if ($entry == "." || $entry == ".." || preg_match("/^\\./", $entry)) {
             if (VPackageHelper::debug()) {
                 echo "skip: {$entry}<br>";
             }
             continue;
         }
         $fullPath = $path . '/' . $entry;
         if (VPackageHelper::debug()) {
             echo "entry: {$entry}<br>";
             echo "full path: {$fullPath}<br>";
         }
         if (JFolder::exists($fullPath)) {
             VPackageHelper::importAll($fullPath);
             VPackageHelper::importRecursive($fullPath);
         }
     }
     $cwd->close();
 }
示例#2
0
 * JA Extenstion Manager Component for J25 & J32
 * ------------------------------------------------------------------------
 * Copyright (C) 2004-2011 J.O.O.M Solutions Co., Ltd. All Rights Reserved.
 * @license - GNU/GPL, http://www.gnu.org/licenses/gpl.html
 * Author: J.O.O.M Solutions Co., Ltd
 * Websites: http://www.joomlart.com - http://www.joomlancers.com
 * ------------------------------------------------------------------------
 */
// no direct access
defined('_JEXEC') or die('Restricted access');
if (!defined("DS")) {
    define("DS", DIRECTORY_SEPARATOR);
}
define("_JAUPDATER_ROOT", realpath(dirname(__FILE__)));
// disable all notice and warning for product release
//error_reporting(E_ALL & ~E_STRICT & ~E_NOTICE);
// debug
//ini_set("xdebug.var_display_max_children", 500);
//ini_set("xdebug.var_display_max_depth", 100);
// -/-
require_once "core/XmlParser.php";
require_once "core/helper/VPackageHelper.php";
$VPackageHelper = new VPackageHelper();
$VPackageHelper->importRecursive(_JAUPDATER_ROOT . "/../xlib");
$VPackageHelper->importAll(_JAUPDATER_ROOT . "/core");
$VPackageHelper->importAll(_JAUPDATER_ROOT . "/core/php5");
$VPackageHelper->import("core.bean.InfoObject");
$VPackageHelper->import("core.bean.Message");
$VPackageHelper->import("core.bean.Products");
$VPackageHelper->importAll(_JAUPDATER_ROOT . "/core/checksum");
$VPackageHelper->importAll(_JAUPDATER_ROOT . "/core/helper");
示例#3
0
 * ------------------------------------------------------------------------
 * JA Extenstion Manager Component for Joomla 2.5
 * ------------------------------------------------------------------------
 * Copyright (C) 2004-2011 J.O.O.M Solutions Co., Ltd. All Rights Reserved.
 * @license - GNU/GPL, http://www.gnu.org/licenses/gpl.html
 * Author: J.O.O.M Solutions Co., Ltd
 * Websites: http://www.joomlart.com - http://www.joomlancers.com
 * ------------------------------------------------------------------------
 */
// no direct access
defined('_JEXEC') or die('Restricted access');
defined("DS") or define("DS", DIRECTORY_SEPARATOR);
define("_JAUPDATER_ROOT", realpath(dirname(__FILE__)));
// disable all notice and warning for product release
//error_reporting(E_ALL & ~E_STRICT & ~E_NOTICE);
// debug
//ini_set("xdebug.var_display_max_children", 500);
//ini_set("xdebug.var_display_max_depth", 100);
// -/-
require_once "core" . DS . "XmlParser.php";
require_once "core" . DS . "helper" . DS . "VPackageHelper.php";
VPackageHelper::importRecursive(_JAUPDATER_ROOT . DS . ".." . DS . "xlib");
VPackageHelper::importAll(_JAUPDATER_ROOT . DS . "core");
VPackageHelper::importAll(_JAUPDATER_ROOT . DS . "core" . DS . "php5");
VPackageHelper::import("core.bean.InfoObject");
VPackageHelper::import("core.bean.Message");
VPackageHelper::import("core.bean.Products");
//2010-01-20
VPackageHelper::importAll(_JAUPDATER_ROOT . DS . "core" . DS . "checksum");
VPackageHelper::importAll(_JAUPDATER_ROOT . DS . "core" . DS . "helper");