当前位置: 首页>>代码示例>>PHP>>正文


PHP Autoload::getInstance方法代码示例

本文整理汇总了PHP中Autoload::getInstance方法的典型用法代码示例。如果您正苦于以下问题:PHP Autoload::getInstance方法的具体用法?PHP Autoload::getInstance怎么用?PHP Autoload::getInstance使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Autoload的用法示例。


在下文中一共展示了Autoload::getInstance方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: upgrade_module_1_2_0

function upgrade_module_1_2_0($eu_legal)
{
    $result = true;
    if (is_file(_PS_MODULE_DIR_ . $eu_legal->name . '/modules/cashondelivery.zip')) {
        $result &= unlink(_PS_MODULE_DIR_ . $eu_legal->name . '/modules/cashondelivery.zip');
    }
    if (is_file(_PS_MODULE_DIR_ . $eu_legal->name . '/modules/gc_ganalytics.zip')) {
        $result &= unlink(_PS_MODULE_DIR_ . $eu_legal->name . '/modules/gc_ganalytics.zip');
    }
    if (is_file(_PS_MODULE_DIR_ . $eu_legal->name . '/modules/moneybookers.zip')) {
        $result &= unlink(_PS_MODULE_DIR_ . $eu_legal->name . '/modules/moneybookers.zip');
    }
    if (is_file(_PS_MODULE_DIR_ . $eu_legal->name . '/modules/paypal.zip')) {
        $result &= unlink(_PS_MODULE_DIR_ . $eu_legal->name . '/modules/paypal.zip');
    }
    if (is_file(_PS_MODULE_DIR_ . $eu_legal->name . '/modules/sofortbanking.zip')) {
        $result &= unlink(_PS_MODULE_DIR_ . $eu_legal->name . '/modules/sofortbanking.zip');
    }
    if (is_file(_PS_MODULE_DIR_ . $eu_legal->name . '/modules/trustedshops.zip')) {
        $result &= unlink(_PS_MODULE_DIR_ . $eu_legal->name . '/modules/trustedshops.zip');
    }
    Autoload::getInstance()->generateIndex();
    $result &= $eu_legal->deleteOverrides('CMSController');
    Autoload::getInstance()->generateIndex();
    return (bool) $result;
}
开发者ID:juanchog,项目名称:modules-1.6.0.12,代码行数:26,代码来源:upgrade-1.2.0.php

示例2: install

 public function install()
 {
     if (!defined('_IS_AGILE_DEV_') && !empty(self::$_newfiles) && !Tools::getValue("redirected")) {
         $adminfolder = AgileInstaller::detect_admin_folder($_SERVER['SCRIPT_FILENAME']);
         AgileInstaller::install_newfiles(self::$_newfiles, $this->name, $adminfolder, 2);
         $result = AgileInstaller::install_health_check(self::$_newfiles, $this->name, $adminfolder);
         if (!empty($result)) {
             $this->_errors[] = '<a target="agile" style="text-decoration:underline;color:blue;" href="http://addons-modules.com/store/en/content/36-agile-module-installation-tips">' . $this->getL('Failed to update files due to permission issue, please visit here for more instructions.') . '</a>';
             return false;
         }
         Tools::redirectAdmin("./index.php?controller=AdminModules&token=" . Tools::getValue("token") . "&install=" . $this->name . "&tab_module=" . $this->tab . " &module_name=" . $this->name . "&anchor=anchor" . $this->name . "&redirected=1");
     }
     $reterrs = AgileInstaller::CanModuleOverride($this->name);
     if (!empty($reterrs)) {
         $this->_errors = array_merge($this->_errors, $reterrs);
         return false;
     }
     $reterrs = AgileInstaller::version_depencies($this->version_dependencies);
     if (!empty($reterrs)) {
         $this->_errors = array_merge($this->_errors, $reterrs);
         return false;
     }
     if (!AgileInstaller::sql_install(dirname(__FILE__) . '/' . self::INSTALL_SQL_FILE)) {
         return false;
     }
     if (!parent::install() or !Configuration::updateValue('AGILE_PAYPAL_BUSINESS', 'paypal@prestashop.com') or !Configuration::updateValue('AGILE_PAYPAL_SANDBOX', 1) or !Configuration::updateValue('AGILE_PAYPAL_FORCE_SUMMARY', '1') or !Configuration::updateValue('AGILE_PAYPAL_HIDE_COUNTRY', 0) or !Configuration::updateValue('AGILE_PAYPAL_HIDE_CARRIER', 0) or !Configuration::updateValue('AGILE_PAYPAL_HIDE_TERMS', 0) or !Configuration::updateValue('AGILE_PAYPAL_HEADER', '') or !Configuration::updateValue('AGILE_PAYPAL_RECURRING_PAYMENT', 0) or !Configuration::updateValue('AGILE_PAYPAL_RECURRING_DAILY', 0) or !Configuration::updateValue('AGILE_PAYPAL_RECURRING_WEEKLY', 0) or !Configuration::updateValue('AGILE_PAYPAL_RECURRING_MONTHLY', 0) or !Configuration::updateValue('AGILE_PAYPAL_RECURRING_YEARLY', 0) or !Configuration::updateValue('AGILE_PAYPAL_SUPPORT_SELLERS', 0) or !Configuration::updateValue('AGILE_PAYPAL_BUSINESS2', '') or !Configuration::updateValue('AGILE_PAYPAL_MICRO_AMOUNT', 0) or !Configuration::updateValue('AGILE_PAYPAL_EXPRESS_ENABLED', 1) or !Configuration::updateValue('AGILE_PAYPAL_AM_INTEGRATED', 0) or !Configuration::updateValue('AGILE_PAYPAL_AM_SHOW_CHOICE', 0) or !Configuration::updateValue('AGILE_PAYPAL_AM_NO_MIX_PRODUCT', 0) or !Configuration::updateValue('AGILE_PAYPAL_SUBSCRIBE_ONLY', 0) or !Configuration::updateValue('AGILE_PAYPAL_CURRENCY', Configuration::get('PS_CURRENCY_DEFAULT')) or !$this->registerHook('agileexpresscheckout') or !$this->registerHook('displayShoppingCartFooter') or !$this->registerHook('displayProductButtons') or !$this->registerHook('displayPayment') or !$this->registerHook('displayPaymentReturn') or !$this->registerHook('displayFooter')) {
         return false;
     }
     if (version_compare(_PS_VERSION_, '1.5', '>=')) {
         Autoload::getInstance()->generateIndex();
     }
     return true;
 }
开发者ID:ecssjapan,项目名称:guiding-you-afteropen,代码行数:33,代码来源:agilepaypalbase.php

示例3: upgrade_module_1_1_2

function upgrade_module_1_1_2($eu_legal)
{
    $result = true;
    if (is_file(_PS_MODULE_DIR_ . $eu_legal->name . '/modules/bankwire.zip')) {
        $result &= unlink(_PS_MODULE_DIR_ . $eu_legal->name . '/modules/bankwire.zip');
    }
    if (is_file(_PS_MODULE_DIR_ . $eu_legal->name . '/modules/cheque.zip')) {
        $result &= unlink(_PS_MODULE_DIR_ . $eu_legal->name . '/modules/cheque.zip');
    }
    if (is_file(_PS_MODULE_DIR_ . $eu_legal->name . '/modules/ogone.zip')) {
        $result &= unlink(_PS_MODULE_DIR_ . $eu_legal->name . '/modules/ogone.zip');
    }
    if (is_file(_PS_MODULE_DIR_ . $eu_legal->name . '/modules/hipay.zip')) {
        $result &= unlink(_PS_MODULE_DIR_ . $eu_legal->name . '/modules/hipay.zip');
    }
    Autoload::getInstance()->generateIndex();
    $result &= $eu_legal->deleteOverrides('Module');
    $result &= $eu_legal->addOverride('Module');
    $result &= $eu_legal->deleteOverrides('Order');
    $result &= $eu_legal->addOverride('Order');
    $result &= $eu_legal->deleteOverrides('OrderDetail');
    $result &= $eu_legal->deleteOverrides('HTMLTemplateInvoice');
    $result &= $eu_legal->addOverride('HTMLTemplateInvoice');
    $result &= $eu_legal->deleteOverrides('HTMLTemplateOrderSlip');
    $result &= $eu_legal->addOverride('HTMLTemplateOrderSlip');
    $result &= $eu_legal->deleteOverrides('Cart');
    $result &= $eu_legal->addOverride('Cart');
    $result &= $eu_legal->deleteOverrides('Category');
    $result &= $eu_legal->addOverride('Category');
    $result &= $eu_legal->deleteOverrides('Manufacturer');
    $result &= $eu_legal->addOverride('Manufacturer');
    $result &= $eu_legal->deleteOverrides('PaymentModule');
    $result &= $eu_legal->addOverride('PaymentModule');
    $result &= $eu_legal->deleteOverrides('Product');
    $result &= $eu_legal->addOverride('Product');
    $result &= $eu_legal->deleteOverrides('ProductSale');
    $result &= $eu_legal->addOverride('ProductSale');
    $result &= $eu_legal->deleteOverrides('Supplier');
    $result &= $eu_legal->addOverride('Supplier');
    $result &= $eu_legal->deleteOverrides('AdminProductsController');
    $result &= $eu_legal->addOverride('AdminProductsController');
    $result &= $eu_legal->deleteOverrides('OrderOpcController');
    $result &= $eu_legal->addOverride('OrderOpcController');
    $result &= $eu_legal->deleteOverrides('OrderController');
    $result &= $eu_legal->addOverride('OrderController');
    $result &= $eu_legal->addOverride('OrderDetailController');
    $result &= $eu_legal->addOverride('ProductController');
    $result &= copy(_PS_MODULE_DIR_ . $eu_legal->name . '/override/controllers/admin/templates/products/combinations.tpl', _PS_OVERRIDE_DIR_ . 'controllers/admin/templates/products/combinations.tpl');
    $result &= copy(_PS_MODULE_DIR_ . $eu_legal->name . '/override/controllers/admin/templates/products/quantities.tpl', _PS_OVERRIDE_DIR_ . 'controllers/admin/templates/products/quantities.tpl');
    Autoload::getInstance()->generateIndex();
    return (bool) $result;
}
开发者ID:juanchog,项目名称:modules-1.6.0.12,代码行数:52,代码来源:upgrade-1.1.2.php

示例4: __construct

 private function __construct()
 {
     if (!class_exists('Autoload')) {
         require __DIR__ . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . 'core' . DIRECTORY_SEPARATOR . 'Autoload.php';
         \Autoload::getInstance();
     }
     $firePhpDir = $GLOBALS['db']->baseDir . '/lib/firephp/firephp-core/lib/FirePHPCore';
     if (!class_exists('FirePHP') && is_dir($firePhpDir)) {
         require $firePhpDir . '/FirePHP.class.php';
         require $firePhpDir . '/fb.php';
         $GLOBALS['firephp'] = \FirePHP::getInstance(true);
     }
 }
开发者ID:caiofior,项目名称:cercaziende,代码行数:13,代码来源:Autoload.php

示例5: uninstallOverrides

 /**
  * Uninstall overrides files for the module
  *
  * @return bool
  */
 public function uninstallOverrides()
 {
     if ($this->name === 'debugtoolbar') {
         return true;
     } else {
         if (!is_dir($this->getLocalPath() . 'override')) {
             return true;
         }
         $result = true;
         foreach (Tools::scandir($this->getLocalPath() . 'override', 'php', '', true) as $file) {
             $class = basename($file, '.php');
             if (Autoload::getInstance()->getClassPath($class . 'Core')) {
                 $result &= $this->removeOverride($class);
             }
         }
         return $result;
     }
 }
开发者ID:victorknust,项目名称:debugtoolbar,代码行数:23,代码来源:Module.php

示例6: install

 public function install()
 {
     if (!$this->preinstall()) {
         return false;
     }
     if (!AgileInstaller::sql_install(dirname(__FILE__) . '/' . self::INSTALL_SQL_FILE)) {
         return false;
     }
     if (parent::install() == false or !$this->setDefaultConfig('ASP_SELLER_NBR', 15) or !$this->setDefaultConfig('ASP_HOME_COLUMN_LEFT', 1) or !$this->setDefaultConfig('ASP_HOME_COLUMN_RIGHT', 0) or !$this->setDefaultConfig('ASP_SELLERS_BLOCK_POSITION', 1) or !$this->setDefaultConfig('ASP_SELLERS_BLOCK_STYLE', 0) or !$this->setDefaultConfig('ASP_SELLERS_BLOCK_VIRTUALSHOP', 0) or !$this->setDefaultConfig('ASP_HEADER_LOGO_MODE', 0) or !$this->setDefaultConfig('ASP_LOCATION_BLOCK_POSITION', 1) or !$this->setDefaultConfig('ASP_LOCATION_BLOCK_STYLE', 0) or !$this->setDefaultConfig('ASP_LOCATION_BLOCK_LEVEL', 'country') or !$this->setDefaultConfig('ASP_SHOP_URL_MODE', AgileMultipleShop::SHOP_URL_MODE_VIRTUAL) or !$this->setDefaultConfig('ASP_SHOP_LOGIN_MODE', AgileMultipleShop::SHOP_LOGIN_MODE_SINGLE) or !$this->setDefaultConfig('ASP_LOCATION_BLOCK_LEVEL', 'country') or !$this->setDefaultConfig('ASP_LOCATION_BLOCK_VIRTUALSHOP', 0) or !$this->setDefaultConfig('ASP_URL_CHOICE_CMS', 0) or !$this->setDefaultConfig('ASP_URL_CHOICE_CAT', 0) or $this->registerHook('displayHeader') == false or $this->registerHook('displayLeftColumn') == false or $this->registerHook('displayRightColumn') == false or $this->registerHook('displayHomeTab') == false or $this->registerHook('displayHomeTabContent') == false) {
         return false;
     }
     if (!AgileInstaller::create_tab('Seller Types', 'AgileSellerTypes', 'AdminAdmin', $this->name)) {
         return false;
     }
     AgileInstaller::init_tab_prmission_for_existing_profiles('AgileSellerTypes', 1, 1, 1, 1);
     $this->create_shops_for_existing_sellers();
     if (version_compare(_PS_VERSION_, '1.5', '>=')) {
         Autoload::getInstance()->generateIndex();
     }
     return true;
 }
开发者ID:sho5kubota,项目名称:guidingyou2,代码行数:21,代码来源:agilemultipleshop.php

示例7: install

 function install()
 {
     $jfwdvmlh = "reterrs";
     $rcfsdwxkrfr = "reterrs";
     $picorcbvbjw = "pid";
     @set_time_limit(120);
     ${"GLOBALS"}["dbmmuxigchv"] = "reterrs";
     if (!$this->check16013()) {
         $this->_errors[] = "<a target=\"agile\" style=\"text-decoration:underline;color:blue;\" href=\"http://addons-modules.com/forum/viewtopic.php?f=10&t=2181&p=7622\">" . $this->l('You are using PrestaShop 1.6.0.12/13/14, you need to fix 2 fatal bugs of PrestaShop first before installing this module. Please visit here for more instructions.') . "</a>";
         return false;
     }
     if (!defined("_IS_AGILE_DEV_") && !empty(self::${${"GLOBALS"}["cutdtieh"]}) && !Tools::getValue("redirected")) {
         ${"GLOBALS"}["cedfefuylho"] = "adminfolder";
         ${"GLOBALS"}["qqwmbcglxk"] = "adminfolder";
         $lfrqohzbyihy = "result";
         $kehebpyykf = "result";
         ${${"GLOBALS"}["cedfefuylho"]} = AgileInstaller::detect_admin_folder($_SERVER["SCRIPT_FILENAME"]);
         AgileInstaller::install_newfiles(self::${${"GLOBALS"}["cutdtieh"]}, $this->name, ${${"GLOBALS"}["lnqnkx"]}, 2);
         ${$lfrqohzbyihy} = AgileInstaller::install_health_check(self::${${"GLOBALS"}["cutdtieh"]}, $this->name, ${${"GLOBALS"}["qqwmbcglxk"]});
         if (!empty(${$kehebpyykf})) {
             $this->_errors[] = "<a target=\"agile\" style=\"text-decoration:underline;color:blue;\" href=\"http://addons-modules.com/store/en/content/36-agile-module-installation-tips\">" . $this->l('Failed to update files due to permission issue, please visit here for more instructions.') . "</a>";
             return false;
         }
         Tools::redirectAdmin("./index.php?controller=AdminModules&token=" . Tools::getValue("token") . "&install=" . $this->name . "&tab_module=" . $this->tab . " &module_name=" . $this->name . "&anchor=anchor" . $this->name . "&redirected=1");
     }
     ${${"GLOBALS"}["dbmmuxigchv"]} = AgileInstaller::version_depencies($this->version_dependencies);
     ${"GLOBALS"}["gkvxrpe"] = "pid";
     if (!empty(${$jfwdvmlh})) {
         $this->_errors = array_merge($this->_errors, ${${"GLOBALS"}["dnccsutmou"]});
         return false;
     }
     ${$rcfsdwxkrfr} = AgileInstaller::CanModuleOverride($this->name);
     if (!empty(${${"GLOBALS"}["dnccsutmou"]})) {
         $qxvkqwflpkt = "reterrs";
         $this->_errors = array_merge($this->_errors, ${$qxvkqwflpkt});
         return false;
     }
     ${"GLOBALS"}["wjqppbgec"] = "pid";
     if (!AgileInstaller::sql_install(dirname(__FILE__) . "/" . self::INSTALL_SQL_FILE)) {
         return false;
     }
     $this->add_fields_for_upgrade();
     $this->build_index();
     if (!AgileInstaller::sql_install(dirname(__FILE__) . "/" . self::FIELDS_CONFIG_SQL_FILE)) {
         return false;
     }
     if (!AgileInstaller::sql_install(dirname(__FILE__) . "/" . self::CUSTOM_FIELDS_CONFIG_SQL_FILE)) {
         return false;
     }
     if (!$this->register_tabs()) {
         return false;
     }
     ${${"GLOBALS"}["wjqppbgec"]} = $this->createLinkedProfile();
     AgileInstaller::init_profile_prmission_for_existing_tabs(${${"GLOBALS"}["gkvxrpe"]}, 0, 0, 0, 0);
     $this->set_permissions(${${"GLOBALS"}["mpdtemgjjhqp"]}, self::${${"GLOBALS"}["evyxjfphfrmf"]});
     if (parent::install() == false or Configuration::updateValue("AGILE_MS_PROFILE_ID", ${$picorcbvbjw}) == false or Configuration::updateValue("AGILE_MS_CUSTOMER_SELLER", 1) == false or Configuration::updateValue("AGILE_MS_SELLER_APPROVAL", 0) == false or Configuration::updateValue("AGILE_MS_EDIT_CATEGORY", 0) == false or Configuration::updateValue("AGILE_MS_PAYMENT_MODE", AgileMultipleSeller::PAYMENT_MODE_STORE) == false or Configuration::updateValue("AGILE_MS_CART_MODE", 0) == false or Configuration::updateValue("AGILE_MS_SELLER_TAB", 1) == false or Configuration::updateValue("AGILE_MS_SELLER_TERMS", 3) == false or Configuration::updateValue("AGILE_MS_PRODUCT_APPROVAL", 0) == false or Configuration::updateValue("AGILE_MS_MYSELLER_URL_DIRECTORY", "my-seller-account") == false or Configuration::updateValue("AGILE_MS_SELLER_PANEL_WITHLEFT", 0) == false or Configuration::updateValue("AGILE_MS_SELLER_PANEL_WITHRIGHT", 0) == false or Configuration::updateValue("AGILE_MS_ALLOW_REGISTER_ATHOME", 0) == false or Configuration::updateValue("AGILE_MS_SELLER_BACK_OFFICE", 0) == false or Configuration::updateValue("AGILE_MS_SELLER_INFO_THEME", 0) == false) {
         return false;
     }
     if (!$this->registerHook("displayFooter") or !$this->registerHook("actionCartSave") or !$this->registerHook("displayCustomerAccountForm") or !$this->registerHook("actionValidateOrder") or !$this->registerHook("displayProductTab") or !$this->registerHook("displayProductTabContent") or !$this->registerHook("actionOrderStatusUpdate") or !$this->registerHook("actionHtaccessCreate") or !$this->registerHook("actionCustomerAccountAdd") or !$this->registerHook("actionCarrierUpdate") or !$this->registerHook("displayHeader")) {
         return false;
     }
     $this->update_sellerinfo_lang_data();
     $this->registerHook("customerAccount");
     $this->registerHook("myAccountBlock");
     $this->hookActionHtaccessCreate(array("install" => 1));
     Configuration::updateValue("AGILE_MS_ADMIN_FOLDER_NAME", AgileInstaller::detect_admin_folder($_SERVER["SCRIPT_FILENAME"]));
     $this->assign_exosting_objects();
     $this->install_otherfiles();
     if (version_compare(_PS_VERSION_, "1.5", ">=")) {
         Autoload::getInstance()->generateIndex();
     }
     return true;
 }
开发者ID:evilscripts,项目名称:gy,代码行数:73,代码来源:agilemultipleseller.php

示例8: CanClassOverride

 public static function CanClassOverride($module2install, $classname)
 {
     $jbqtssrcmp = "classpath";
     $hjoyfmjjtf = "classname";
     ${"GLOBALS"}["flpfpzeo"] = "errors";
     ${"GLOBALS"}["ltyuzjfm"] = "conflict_link";
     ${"GLOBALS"}["rrlhpow"] = "override_file";
     ${"GLOBALS"}["eelqcrydc"] = "module2install";
     ${${"GLOBALS"}["flpfpzeo"]} = array();
     $ssgurhomq = "override_path";
     $izjofmhcocw = "classname";
     ${${"GLOBALS"}["csslhyqthot"]} = Autoload::getInstance()->getClassPath(${$izjofmhcocw} . "Core");
     $khnoufd = "method";
     $tcxzehon = "classname";
     $xojegowbdl = "module_class";
     ${"GLOBALS"}["cdmxbjq"] = "override_path";
     $adfprxq = "errors";
     if (!(${$jbqtssrcmp} = Autoload::getInstance()->getClassPath(${${"GLOBALS"}["aqkgacii"]}))) {
         return array();
     }
     ${$ssgurhomq} = _PS_ROOT_DIR_ . DIRECTORY_SEPARATOR . Autoload::getInstance()->getClassPath(${$hjoyfmjjtf});
     ${"GLOBALS"}["nezdiluiifl"] = "override_path";
     if (!file_exists(${${"GLOBALS"}["nezdiluiifl"]}) || file_exists(${${"GLOBALS"}["cdmxbjq"]}) && !is_writable(${${"GLOBALS"}["bhfeqbnibc"]})) {
         ${$adfprxq}[] = sprintf(Tools::displayError("file (%s) not writable"), ${${"GLOBALS"}["bhfeqbnibc"]});
     }
     $utvqyhoyw = "override_class";
     $dgfkmuwpxcu = "override_file";
     ${${"GLOBALS"}["ltyuzjfm"]} = "&nbsp;&nbsp;<a href=\"http://addons-modules.com/store/en/content/75-classmethod-conflict-and-code-merge\" target=\"_blank\" style=\"color:blue;text-decoration:underline;\">Why this and How to resolve this?</a>";
     ${$dgfkmuwpxcu} = file(${${"GLOBALS"}["bhfeqbnibc"]});
     eval(preg_replace(array("#^\\s*<\\?php#", "#class\\s+" . ${${"GLOBALS"}["aqkgacii"]} . "\\s+extends\\s+([a-z0-9_]+)(\\s+implements\\s+([a-z0-9_]+))?#i"), array("", "class " . ${${"GLOBALS"}["aqkgacii"]} . "OverrideOriginalTrial"), implode("", ${${"GLOBALS"}["rrlhpow"]})));
     ${$utvqyhoyw} = new ReflectionClass(${$tcxzehon} . "OverrideOriginalTrial");
     ${${"GLOBALS"}["jiepqsz"]} = file(_PS_ROOT_DIR_ . DIRECTORY_SEPARATOR . "modules" . DIRECTORY_SEPARATOR . ${${"GLOBALS"}["eelqcrydc"]} . DIRECTORY_SEPARATOR . "override" . DIRECTORY_SEPARATOR . ${${"GLOBALS"}["csslhyqthot"]});
     eval(preg_replace(array("#^\\s*<\\?php#", "#class\\s+" . ${${"GLOBALS"}["aqkgacii"]} . "(\\s+extends\\s+([a-z0-9_]+)(\\s+implements\\s+([a-z0-9_]+))?)?#i"), array("", "class " . ${${"GLOBALS"}["aqkgacii"]} . "OverrideTrial"), implode("", ${${"GLOBALS"}["jiepqsz"]})));
     ${$xojegowbdl} = new ReflectionClass(${${"GLOBALS"}["aqkgacii"]} . "OverrideTrial");
     foreach ($module_class->getMethods() as ${$khnoufd}) {
         if ($override_class->hasMethod($method->getName())) {
             $yisnean = "conflict_link";
             ${"GLOBALS"}["itgpjxyzkk"] = "errors";
             ${${"GLOBALS"}["itgpjxyzkk"]}[] = sprintf(Tools::displayError("The method %1\$s in the class %2\$s is already overriden."), $method->getName(), ${${"GLOBALS"}["aqkgacii"]}) . ${$yisnean};
         }
     }
     $yvuzwwudgji = "errors";
     foreach ($module_class->getProperties() as ${${"GLOBALS"}["jkobhjj"]}) {
         if ($override_class->hasProperty($property->getName())) {
             $mawoivnk = "classname";
             ${${"GLOBALS"}["tyfwehg"]}[] = sprintf(Tools::displayError("The property %1\$s in the class %2\$s is already defined."), $property->getName(), ${$mawoivnk}) . ${${"GLOBALS"}["qmirfykx"]};
         }
     }
     return ${$yvuzwwudgji};
 }
开发者ID:sho5kubota,项目名称:guidingyou2,代码行数:50,代码来源:AgileInstaller.php

示例9: checkOverrides

 public function checkOverrides()
 {
     $errors = array();
     Autoload::getInstance()->generateIndex();
     foreach (Tools::scandir($this->getLocalPath() . 'override', 'php', '', true) as $file) {
         $class = basename($file, '.php');
         if (Autoload::getInstance()->getClassPath($class . 'Core') && ($error = $this->checkOverride($class))) {
             $errors[] = $error;
         }
     }
     return $errors;
 }
开发者ID:pomdev,项目名称:modules-1.6.0.9,代码行数:12,代码来源:eu_legal.php

示例10: install

 public function install()
 {
     if (!defined("_IS_AGILE_DEV_") && !empty(self::${${"GLOBALS"}["wrtttnerkh"]}) && !Tools::getValue("redirected")) {
         $wgxanwq = "result";
         ${${"GLOBALS"}["dctmswpd"]} = AgileInstaller::detect_admin_folder($_SERVER["SCRIPT_FILENAME"]);
         AgileInstaller::install_newfiles(self::${${"GLOBALS"}["wrtttnerkh"]}, $this->name, ${${"GLOBALS"}["dctmswpd"]}, 2);
         ${$wgxanwq} = AgileInstaller::install_health_check(self::${${"GLOBALS"}["wrtttnerkh"]}, $this->name, ${${"GLOBALS"}["dctmswpd"]});
         if (!empty(${${"GLOBALS"}["usgkpcjvgm"]})) {
             $this->_errors[] = "<a target=\"agile\" style=\"text-decoration:underline;color:blue;\" href=\"http://addons-modules.com/store/en/content/36-agile-module-installation-tips\">" . $this->l('Failed to update files due to permission issue, please visit here for more instructions.') . "</a>";
             return false;
         }
         Tools::redirectAdmin("./index.php?controller=AdminModules&token=" . Tools::getValue("token") . "&install=" . $this->name . "&tab_module=" . $this->tab . " &module_name=" . $this->name . "&anchor=anchor" . $this->name . "&redirected=1");
     }
     ${${"GLOBALS"}["kmzguepw"]} = AgileInstaller::version_depencies($this->version_dependencies);
     if (!empty(${${"GLOBALS"}["kmzguepw"]})) {
         $grvyggbo = "reterrs";
         $this->_errors = array_merge($this->_errors, ${$grvyggbo});
         return false;
     }
     if (!AgileInstaller::sql_install(dirname(__FILE__) . "/" . self::INSTALL_SQL_FILE)) {
         return false;
     }
     AgileInstaller::add_field_ifnotexists("agile_sellermessage", "attpsname1", "varchar(256)", "NULL");
     AgileInstaller::add_field_ifnotexists("agile_sellermessage", "attpsname2", "varchar(256)", "NULL");
     AgileInstaller::add_field_ifnotexists("agile_sellermessage", "attpsname3", "varchar(256)", "NULL");
     AgileInstaller::add_field_ifnotexists("agile_sellermessage", "attshname1", "varchar(256)", "NULL");
     AgileInstaller::add_field_ifnotexists("agile_sellermessage", "attshname2", "varchar(256)", "NULL");
     AgileInstaller::add_field_ifnotexists("agile_sellermessage", "attshname3", "varchar(256)", "NULL");
     ${${"GLOBALS"}["hyjuumq"]} = intval(Configuration::get("AGILE_MS_PROFILE_ID"));
     if (!AgileInstaller::create_tab("Customer Questions", "AgileSellerMessages", _PS_VERSION_ > "1.5" ? "AdminParentCustomer" : "AdminCustomers", $this->name)) {
         return false;
     }
     AgileInstaller::init_tab_prmission_for_existing_profiles("AgileSellerMessages", 1, 1, 1, 1);
     if (parent::install() == false or $this->registerHook("displayHeader") == false or !$this->registerHook("displayRightColumnProduct") or $this->registerHook("displayProductTab") == false or $this->registerHook("displayProductTabContent") == false or Configuration::updateValue("ASMGER_LOGIN_REQUIRED", 0) == false or Configuration::updateValue("ASMGER_APPROVAL_REQUIRED", 1) == false or Configuration::updateValue("ASMGER_HIDE_EMAIL", 1) == false or Configuration::updateValue("ASMGER_EMAIL_COPYADMIN", 0) == false or Configuration::updateValue("ASMGER_DONOTREPLY_EMAIL", "") == false or Configuration::updateValue("ASMGER_USE_CAPCHA", 1) == false or Configuration::updateValue("ASMGER_ALLOW_ATTACHMENT", 0) == false) {
         return false;
     }
     if (version_compare(_PS_VERSION_, "1.5", ">=")) {
         Autoload::getInstance()->generateIndex();
     }
     return true;
 }
开发者ID:evilscripts,项目名称:gy,代码行数:41,代码来源:agilesellermessenger.php

示例11: scandir

    private function scandir($directory)
    {
        $directories = scandir($directory);
        foreach ($directories as $dir) {
            if ($dir == '.' || $dir == ".git" || $dir == '..') {
                continue;
            }
            if (is_dir($directory . DIRECTORY_SEPARATOR . $dir)) {
                $this->directoryTree->append($directory . DIRECTORY_SEPARATOR . $dir . PATH_SEPARATOR);
                $this->scandir($directory . DIRECTORY_SEPARATOR . $dir);
            }
        }
        return $this->directoryTree;
    }
}
Autoload::getInstance()->load();
/**
 * Loading unknown classes
 * @param string $class
 */
function __autoload($class)
{
    $arr_includePath = explode(PATH_SEPARATOR, get_include_path());
    $included = false;
    foreach ($arr_includePath as $directory) {
        if (file_exists($directory . DIRECTORY_SEPARATOR . $class . '.php')) {
            require_once $directory . DIRECTORY_SEPARATOR . $class . '.php';
            $included = true;
            break;
        }
    }
开发者ID:pedromenezes,项目名称:Espertim,代码行数:31,代码来源:Autoload.php

示例12: CanClassOverride

 public static function CanClassOverride($module2install, $classname)
 {
     $ysuzfuk = "override_path";
     $erfcgqeeenk = "errors";
     ${"GLOBALS"}["gxdiccosjfh"] = "classname";
     ${"GLOBALS"}["qbciuei"] = "module2install";
     $edywymvsujp = "classname";
     ${$erfcgqeeenk} = array();
     ${"GLOBALS"}["twfjthlpzv"] = "path";
     ${"GLOBALS"}["hzihxkh"] = "classname";
     $htmpokrkvs = "module_file";
     ${${"GLOBALS"}["euxfcwdutpdp"]} = Autoload::getInstance()->getClassPath(${${"GLOBALS"}["sbubeasmspd"]} . "Core");
     ${"GLOBALS"}["whrscxjddk"] = "classname";
     ${"GLOBALS"}["ridgqqtfp"] = "errors";
     ${"GLOBALS"}["scbjwnqbvsfc"] = "override_path";
     if (!(${${"GLOBALS"}["krajop"]} = Autoload::getInstance()->getClassPath(${${"GLOBALS"}["sbubeasmspd"]}))) {
         return array();
     }
     ${${"GLOBALS"}["nmbjwuxycc"]} = _PS_ROOT_DIR_ . DIRECTORY_SEPARATOR . Autoload::getInstance()->getClassPath(${${"GLOBALS"}["hzihxkh"]});
     if (!file_exists(${${"GLOBALS"}["nmbjwuxycc"]}) || file_exists(${$ysuzfuk}) && !is_writable(${${"GLOBALS"}["nmbjwuxycc"]})) {
         ${${"GLOBALS"}["ridgqqtfp"]}[] = sprintf(Tools::displayError("file (%s) not writable"), ${${"GLOBALS"}["scbjwnqbvsfc"]});
     }
     $tqibaib = "classname";
     ${${"GLOBALS"}["iqnnfo"]} = "&nbsp;&nbsp;<a href=\"http://addons-modules.com/store/en/content/75-classmethod-conflict-and-code-merge\" target=\"_blank\" style=\"color:blue;text-decoration:underline;\">Why this and How to resolve this?</a>";
     ${${"GLOBALS"}["cdffwrikt"]} = file(${${"GLOBALS"}["nmbjwuxycc"]});
     eval(preg_replace(array("#^\\s*<\\?php#", "#class\\s+" . ${${"GLOBALS"}["whrscxjddk"]} . "\\s+extends\\s+([a-z0-9_]+)(\\s+implements\\s+([a-z0-9_]+))?#i"), array("", "class " . ${$tqibaib} . "OverrideOriginalTrial"), implode("", ${${"GLOBALS"}["cdffwrikt"]})));
     ${"GLOBALS"}["whvrxgl"] = "classname";
     ${${"GLOBALS"}["ligvyrfhgum"]} = new ReflectionClass(${$edywymvsujp} . "OverrideOriginalTrial");
     ${${"GLOBALS"}["dexvbipf"]} = file(_PS_ROOT_DIR_ . DIRECTORY_SEPARATOR . "modules" . DIRECTORY_SEPARATOR . ${${"GLOBALS"}["qbciuei"]} . DIRECTORY_SEPARATOR . "override" . DIRECTORY_SEPARATOR . ${${"GLOBALS"}["twfjthlpzv"]});
     eval(preg_replace(array("#^\\s*<\\?php#", "#class\\s+" . ${${"GLOBALS"}["gxdiccosjfh"]} . "(\\s+extends\\s+([a-z0-9_]+)(\\s+implements\\s+([a-z0-9_]+))?)?#i"), array("", "class " . ${${"GLOBALS"}["sbubeasmspd"]} . "OverrideTrial"), implode("", ${$htmpokrkvs})));
     ${${"GLOBALS"}["gxkvgrjpv"]} = new ReflectionClass(${${"GLOBALS"}["whvrxgl"]} . "OverrideTrial");
     foreach ($module_class->getMethods() as ${${"GLOBALS"}["tewuwucskid"]}) {
         if ($override_class->hasMethod($method->getName())) {
             ${"GLOBALS"}["exeikwkvehk"] = "classname";
             $dwkicimh = "errors";
             ${$dwkicimh}[] = sprintf(Tools::displayError("The method %1\$s in the class %2\$s is already overriden."), $method->getName(), ${${"GLOBALS"}["exeikwkvehk"]}) . ${${"GLOBALS"}["iqnnfo"]};
         }
     }
     foreach ($module_class->getProperties() as ${${"GLOBALS"}["cxvctvgx"]}) {
         if ($override_class->hasProperty($property->getName())) {
             ${"GLOBALS"}["xarkoip"] = "conflict_link";
             ${"GLOBALS"}["yrudbdlum"] = "errors";
             ${${"GLOBALS"}["yrudbdlum"]}[] = sprintf(Tools::displayError("The property %1\$s in the class %2\$s is already defined."), $property->getName(), ${${"GLOBALS"}["sbubeasmspd"]}) . ${${"GLOBALS"}["xarkoip"]};
         }
     }
     return ${${"GLOBALS"}["hcqgjwrssu"]};
 }
开发者ID:sho5kubota,项目名称:guidingyou2,代码行数:47,代码来源:AgileInstaller.php

示例13: initFormFields

 /**
  * This method generate the form for fields translations
  */
 public function initFormFields()
 {
     $name_var = $this->translations_informations[$this->type_selected]['var'];
     $GLOBALS[$name_var] = $this->fileExists();
     $missing_translations_fields = array();
     $class_array = array();
     $tabs_array = array();
     $count = 0;
     $files_by_directory = $this->getFileToParseByTypeTranslation();
     foreach ($files_by_directory['php'] as $dir => $files) {
         foreach ($files as $file) {
             $exclude_files = array('index.php', 'Autoload.php', 'StockManagerInterface.php', 'TaxManagerInterface.php', 'WebserviceOutputInterface.php', 'WebserviceSpecificManagementInterface.php');
             if (!preg_match('/\\.php$/', $file) || in_array($file, $exclude_files)) {
                 continue;
             }
             $class_name = substr($file, 0, -4);
             if (!class_exists($class_name, false)) {
                 Autoload::getInstance()->load($class_name);
             }
             if (!is_subclass_of($class_name . 'Core', 'ObjectModel')) {
                 continue;
             }
             $class_array[$class_name] = call_user_func(array($class_name, 'getValidationRules'), $class_name);
         }
     }
     foreach ($class_array as $prefix_key => $rules) {
         if (isset($rules['validate'])) {
             foreach ($rules['validate'] as $key => $value) {
                 if (isset($GLOBALS[$name_var][$prefix_key . '_' . md5($key)])) {
                     $tabs_array[$prefix_key][$key]['trad'] = html_entity_decode($GLOBALS[$name_var][$prefix_key . '_' . md5($key)], ENT_COMPAT, 'UTF-8');
                     $count++;
                 } else {
                     if (!isset($tabs_array[$prefix_key][$key]['trad'])) {
                         $tabs_array[$prefix_key][$key]['trad'] = '';
                         if (!isset($missing_translations_fields[$prefix_key])) {
                             $missing_translations_fields[$prefix_key] = 1;
                         } else {
                             $missing_translations_fields[$prefix_key]++;
                         }
                         $count++;
                     }
                 }
             }
         }
         if (isset($rules['validateLang'])) {
             foreach ($rules['validateLang'] as $key => $value) {
                 if (isset($GLOBALS[$name_var][$prefix_key . '_' . md5($key)])) {
                     $tabs_array[$prefix_key][$key]['trad'] = '';
                     if (array_key_exists($prefix_key . '_' . md5(addslashes($key)), $GLOBALS[$name_var])) {
                         $tabs_array[$prefix_key][$key]['trad'] = html_entity_decode($GLOBALS[$name_var][$prefix_key . '_' . md5(addslashes($key))], ENT_COMPAT, 'UTF-8');
                     }
                     $count++;
                 } else {
                     if (!isset($tabs_array[$prefix_key][$key]['trad'])) {
                         $tabs_array[$prefix_key][$key]['trad'] = '';
                         if (!isset($missing_translations_fields[$prefix_key])) {
                             $missing_translations_fields[$prefix_key] = 1;
                         } else {
                             $missing_translations_fields[$prefix_key]++;
                         }
                         $count++;
                     }
                 }
             }
         }
     }
     $this->tpl_view_vars = array_merge($this->tpl_view_vars, array('count' => $count, 'limit_warning' => $this->displayLimitPostWarning($count), 'tabsArray' => $tabs_array, 'missing_translations' => $missing_translations_fields));
     $this->initToolbar();
     $this->base_tpl_view = 'translation_form.tpl';
     return parent::renderView();
 }
开发者ID:rrameshsat,项目名称:Prestashop,代码行数:74,代码来源:AdminTranslationsController.php

示例14: execute

 public static final function execute()
 {
     $session = InstallSession::getInstance();
     if (!$session->last_step || $session->last_step == 'welcome') {
         Autoload::getInstance()->generateIndex();
     }
     if (Tools::getValue('compile_templates')) {
         require_once _PS_INSTALL_CONTROLLERS_PATH_ . 'http/smarty_compile.php';
         exit;
     }
     // Include all controllers
     foreach (self::$steps as $step) {
         if (!file_exists(_PS_INSTALL_CONTROLLERS_PATH_ . 'http/' . $step . '.php')) {
             throw new PrestashopInstallerException("Controller file 'http/{$step}.php' not found");
         }
         require_once _PS_INSTALL_CONTROLLERS_PATH_ . 'http/' . $step . '.php';
         $classname = 'InstallControllerHttp' . $step;
         self::$instances[$step] = new $classname($step);
     }
     if (!$session->last_step || !in_array($session->last_step, self::$steps)) {
         $session->last_step = self::$steps[0];
     }
     // Set timezone
     if ($session->shop_timezone) {
         @date_default_timezone_set($session->shop_timezone);
     }
     // Get current step (check first if step is changed, then take it from session)
     if (Tools::getValue('step')) {
         $current_step = Tools::getValue('step');
         $session->step = $current_step;
     } else {
         $current_step = isset($session->step) ? $session->step : self::$steps[0];
     }
     if (!in_array($current_step, self::$steps)) {
         $current_step = self::$steps[0];
     }
     // Validate all steps until current step. If a step is not valid, use it as current step.
     foreach (self::$steps as $check_step) {
         // Do not validate current step
         if ($check_step == $current_step) {
             break;
         }
         if (!self::$instances[$check_step]->validate()) {
             $current_step = $check_step;
             $session->step = $current_step;
             $session->last_step = $current_step;
             break;
         }
     }
     // Submit form to go to next step
     if (Tools::getValue('submitNext')) {
         self::$instances[$current_step]->processNextStep();
         // If current step is validated, let's go to next step
         if (self::$instances[$current_step]->validate()) {
             $current_step = self::$instances[$current_step]->findNextStep();
         }
         $session->step = $current_step;
         // Change last step
         if (self::getStepOffset($current_step) > self::getStepOffset($session->last_step)) {
             $session->last_step = $current_step;
         }
     } else {
         if (Tools::getValue('submitPrevious') && $current_step != self::$steps[0]) {
             $current_step = self::$instances[$current_step]->findPreviousStep($current_step);
             $session->step = $current_step;
         }
     }
     self::$instances[$current_step]->process();
     self::$instances[$current_step]->display();
 }
开发者ID:toufikadfab,项目名称:PrestaShop-1.5,代码行数:70,代码来源:controllerHttp.php

示例15:

<?php

/*************************************************************************************/
/*                                                                                   */
/*      Thelia	                                                                     */
/*                                                                                   */
/*      Copyright (c) OpenStudio                                                     */
/*		email : info@thelia.net                                                      */
/*      web : http://www.thelia.net                                                  */
/*                                                                                   */
/*      This program is free software; you can redistribute it and/or modify         */
/*      it under the terms of the GNU General Public License as published by         */
/*      the Free Software Foundation; either version 3 of the License                */
/*                                                                                   */
/*      This program is distributed in the hope that it will be useful,              */
/*      but WITHOUT ANY WARRANTY; without even the implied warranty of               */
/*      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the                */
/*      GNU General Public License for more details.                                 */
/*                                                                                   */
/*      You should have received a copy of the GNU General Public License            */
/*	    along with this program. If not, see <http://www.gnu.org/licenses/>.         */
/*                                                                                   */
/*************************************************************************************/
require_once __DIR__ . '/../classes/Autoload.class.php';
$basedir = __DIR__ . "/../";
$autoload = Autoload::getInstance();
$autoload->addDirectories(array($basedir . "/classes/", $basedir . "/classes/actions/", $basedir . "/classes/filtres/", $basedir . "/classes/parseur/", $basedir . "/classes/tlog/", $basedir . "/classes/tlog/destinations", __DIR__ . "/classes/", __DIR__ . "/actions/"));
$autoload->register();
开发者ID:anti-conformiste,项目名称:thelia1,代码行数:28,代码来源:autoload.php


注:本文中的Autoload::getInstance方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。