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


PHP App::getRegistry方法代码示例

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


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

示例1: __construct

 public function __construct($attributes)
 {
     parent::__construct($attributes);
     if (!isset($this->attributes['allow_generate'])) {
         $this->attributes['allow_generate'] = 1;
     }
     $this->attributes['category_field'] = $this->attributes['category']->getName();
     $this->attributes['price_field'] = $this->attributes['price']->getName();
     $this->attributes['vat_field_name'] = $this->attributes['vat_field']->getName();
     $this->attributes['vat_values'] = App::getModel('vat/vat')->getVATValuesAll();
     $this->attributes['suffixes'] = App::getModel('suffix/suffix')->getSuffixTypes();
     $this->_jsGetAttributeSetsForCategories = 'GetAttributeSetsForCategories_' . $this->_id;
     $this->_jsGetAttributesForSet = 'GetAttributesForSet_' . $this->_id;
     $this->_jsgetValuesForAttribute = 'getValuesForAttribute_' . $this->_id;
     $this->_jsGetCartesian = 'GetCartesian_' . $this->_id;
     $this->_jsAddAttribute = 'AddAttribute_' . $this->_id;
     $this->_jsAddValue = 'AddValue_' . $this->_id;
     $this->attributes['get_sets_for_categories'] = 'xajax_' . $this->_jsGetAttributeSetsForCategories;
     $this->attributes['getattributes_for_set'] = 'xajax_' . $this->_jsGetAttributesForSet;
     $this->attributes['get_values_for_attribute'] = 'xajax_' . $this->_jsgetValuesForAttribute;
     $this->attributes['get_cartesian'] = 'xajax_' . $this->_jsGetCartesian;
     $this->attributes['add_attribute'] = 'xajax_' . $this->_jsAddAttribute;
     $this->attributes['add_value'] = 'xajax_' . $this->_jsAddValue;
     App::getRegistry()->xajaxInterface->registerFunction(array($this->_jsGetAttributeSetsForCategories, $this, 'getAttributeSetsForCategories'));
     App::getRegistry()->xajaxInterface->registerFunction(array($this->_jsGetAttributesForSet, $this, 'getAttributesForSet'));
     App::getRegistry()->xajaxInterface->registerFunction(array($this->_jsgetValuesForAttribute, $this, 'getValuesForAttribute'));
     App::getRegistry()->xajaxInterface->registerFunction(array($this->_jsGetCartesian, $this, 'getCartesian'));
     App::getRegistry()->xajaxInterface->registerFunction(array($this->_jsAddAttribute, $this, 'addAttribute'));
     App::getRegistry()->xajaxInterface->registerFunction(array($this->_jsAddValue, $this, 'addValue'));
 }
开发者ID:jmarceli,项目名称:WellCommerce,代码行数:30,代码来源:ProductVariantsEditor.php

示例2: setStoreId

 public static function setStoreId($id)
 {
     if (App::getRegistry()->router->getMode() == 0) {
         return Session::setActiveMainsideStoreId($id);
     } else {
         return Session::setActiveStoreId($id);
     }
 }
开发者ID:krisldz,项目名称:Gekosale2,代码行数:8,代码来源:Helper.php

示例3: __construct

 public function __construct($attributes)
 {
     parent::__construct($attributes);
     $this->_jsGetSelectedInfo = 'GetSelectedInfo_' . $this->_id;
     if (isset($this->_attributes['load_selected_info']) && is_callable($this->_attributes['load_selected_info'])) {
         $this->_attributes['get_selected_info'] = 'xajax_' . $this->_jsGetSelectedInfo;
         App::getRegistry()->xajaxInterface->registerFunction(array($this->_jsGetSelectedInfo, $this, 'getSelectedInfo'));
     }
 }
开发者ID:krisldz,项目名称:Gekosale2,代码行数:9,代码来源:RelatedCategories.php

示例4: __construct

 public function __construct($attributes)
 {
     parent::__construct($attributes);
     $this->_jsFunction = 'LoadProducts_' . $this->_id;
     $this->attributes['jsfunction'] = 'xajax_' . $this->_jsFunction;
     App::getRegistry()->xajax->registerFunction(array($this->_jsFunction, $this, 'loadProducts'));
     $this->attributes['load_categorychildren'] = App::getRegistry()->xajaxInterface->registerFunction(array('LoadCategoryChildren_' . $this->_id, $this, 'loadCategoryChildren'));
     $this->attributes['datagrid_filter'] = $this->getDatagridfilterData();
 }
开发者ID:jmarceli,项目名称:WellCommerce,代码行数:9,代码来源:OrderEditor.php

示例5: __construct

 public function __construct($attributes)
 {
     parent::__construct($attributes);
     $this->_jsFunction = 'LoadClients_' . $this->_id;
     $this->_jsFunctionDetails = 'LoadClientData_' . $this->_id;
     $this->attributes['jsfunction'] = 'xajax_' . $this->_jsFunction;
     $this->attributes['jsfunctiondetails'] = 'xajax_' . $this->_jsFunctionDetails;
     App::getRegistry()->xajax->registerFunction(array($this->_jsFunction, $this, 'loadClients'));
     App::getRegistry()->xajaxInterface->registerFunction(array($this->_jsFunctionDetails, $this, 'loadClientDetails'));
 }
开发者ID:jmarceli,项目名称:WellCommerce,代码行数:10,代码来源:ClientSelect.php

示例6: __construct

 public function __construct($attributes)
 {
     $attributes['attributes'] = App::getModel('technicaldata')->getTechnicalDataFull();
     parent::__construct($attributes);
     App::getRegistry()->xajaxInterface->registerFunction(array('deleteAttribute', $this, 'deleteAttribute'));
     App::getRegistry()->xajaxInterface->registerFunction(array('renameAttribute', $this, 'renameAttribute'));
     App::getRegistry()->xajaxInterface->registerFunction(array('renameValue', $this, 'renameValue'));
     $this->attributes['deleteAttributeFunction'] = 'xajax_deleteAttribute';
     $this->attributes['renameAttributeFunction'] = 'xajax_renameAttribute';
     $this->attributes['renameValueFunction'] = 'xajax_renameValue';
 }
开发者ID:jmarceli,项目名称:WellCommerce,代码行数:11,代码来源:TechnicalAttributeEditor.php

示例7: __construct

 public function __construct($message, $code = 0, $messageToLogFile = NULL)
 {
     parent::__construct($message, $code, $messageToLogFile);
     if (__ENABLE_DEBUG__ == 0) {
         App::redirect('admin/mainside');
     }
     $this->errorDesignPath = 'error/index/index.tpl';
     App::getModel('template')->assign('SHOP_NAME', App::getRegistry()->session->getActiveShopName());
     App::getModel('template')->assign('error', preg_replace('/(\\n|\\r)+/', '\\n', nl2br(addslashes($this->errorText))));
     App::getModel('template')->display($this->errorDesignPath);
     die;
 }
开发者ID:krisldz,项目名称:Gekosale2,代码行数:12,代码来源:CoreException.php

示例8: __construct

 public function __construct($message, $code = 0, $messageToLogFile = NULL)
 {
     parent::__construct($message, $code, $messageToLogFile);
     if (__ENABLE_DEBUG__ == 0) {
         App::redirectSeo(App::getURLAdress());
     }
     App::getModel('template')->assign('SHOP_NAME', App::getRegistry()->session->getActiveShopName());
     App::getModel('template')->assign('error', $this->errorText);
     App::getModel('template')->assign('BASE_URL', App::getURLAdress());
     App::getModel('template')->display('error/index/layout.tpl');
     die;
 }
开发者ID:krisldz,项目名称:Gekosale2,代码行数:12,代码来源:FrontendException.php

示例9: __construct

 public function __construct($attributes)
 {
     parent::__construct($attributes);
     if (!isset($this->attributes['products_source_field']) || !$this->attributes['products_source_field'] instanceof ProductSelect) {
         throw new Exception("Source field (attribute: products_source_field) not set for field '{$this->attributes['name']}'.");
     }
     $this->attributes['products_source_field_name'] = $this->attributes['products_source_field']->getName();
     $this->attributes['vat_values'] = App::getModel('vat/vat')->getVATAll();
     $this->attributes['prefixes'] = array(Translation::get('TXT_PRICE_NET'), Translation::get('TXT_PRICE_GROSS'));
     $this->_jsFunction = 'LoadProductDataForAggregation_' . $this->_id;
     $this->attributes['jsfunction'] = 'xajax_' . $this->_jsFunction;
     App::getRegistry()->xajaxInterface->registerFunction(array($this->_jsFunction, $this, 'loadProductData'));
 }
开发者ID:jmarceli,项目名称:WellCommerce,代码行数:13,代码来源:ProductAggregator.php

示例10: __construct

 public function __construct($attributes)
 {
     parent::__construct($attributes);
     $this->_jsFunction = 'LoadProducts_' . $this->_id;
     $this->attributes['jsfunction'] = 'xajax_' . $this->_jsFunction;
     App::getRegistry()->xajax->registerFunction(array($this->_jsFunction, $this, 'loadProducts_' . $this->_id));
     $this->attributes['load_categorychildren'] = App::getRegistry()->xajaxInterface->registerFunction(array('LoadCategoryChildren_' . $this->_id, $this, 'loadCategoryChildren'));
     if (isset($this->attributes['exclude_from'])) {
         $this->attributes['exclude_from_field'] = $this->attributes['exclude_from']->getName();
     }
     if (!isset($this->attributes['exclude'])) {
         $this->attributes['exclude'] = array(0);
     }
     $this->attributes['datagrid_filter'] = $this->getDatagridfilterData();
 }
开发者ID:jmarceli,项目名称:WellCommerce,代码行数:15,代码来源:ProductSelect.php

示例11: __construct

 public function __construct($attributes)
 {
     parent::__construct($attributes);
     if (!isset($this->attributes['key'])) {
         throw new Exception("Datagrid key (attribute: key) not set for field '{$this->attributes['name']}'.");
     }
     if (!isset($this->attributes['columns'])) {
         throw new Exception("Datagrid columns (attribute: columns) not set for field '{$this->attributes['name']}'.");
     }
     if (!isset($this->attributes['datagrid_init_function']) || !is_callable($this->attributes['datagrid_init_function'])) {
         throw new Exception("Datagrid initialization function not set (attribute: datagrid_init_function) for field '{$this->attributes['name']}'. Hint: check whether the method you have specified is public.");
     }
     $this->_jsFunction = 'LoadRecords_' . $this->_id;
     $this->attributes['jsfunction'] = 'xajax_' . $this->_jsFunction;
     App::getRegistry()->xajax->registerFunction(array($this->_jsFunction, $this, 'loadRecords_' . $this->_id));
 }
开发者ID:jmarceli,项目名称:WellCommerce,代码行数:16,代码来源:DatagridSelect.php

示例12: __construct

 public function __construct($attributes)
 {
     parent::__construct($attributes);
     $this->attributes['session_name'] = session_name();
     $this->attributes['session_id'] = session_id();
     $this->attributes['file_types'] = array('jpg', 'png', 'gif', 'swf');
     if (!isset($this->attributes['file_source'])) {
         $this->attributes['file_source'] = 'upload/';
     }
     $this->attributes['file_types_description'] = \WellCommerce\Translation::get('TXT_FILE_TYPES_IMAGE');
     $this->attributes['upload_url'] = App::getURLAdressWithAdminPane() . 'files/add/' . base64_encode($this->attributes['file_source']);
     $this->attributes['load_handler'] = 'xajax_LoadFiles_' . $this->_id;
     App::getRegistry()->xajaxInterface->registerFunction(array('LoadFiles_' . $this->_id, $this, 'LoadFiles'));
     $this->attributes['delete_handler'] = 'xajax_DeleteFile_' . $this->_id;
     App::getRegistry()->xajaxInterface->registerFunction(array('deleteFile_' . $this->_id, $this, 'deleteFile'));
     $this->attributes['type_icons'] = array('cdup' => DESIGNPATH . '_images_panel/icons/filetypes/cdup.png', 'unknown' => DESIGNPATH . '_images_panel/icons/filetypes/unknown.png', 'directory' => DESIGNPATH . '_images_panel/icons/filetypes/directory.png', 'gif' => DESIGNPATH . '_images_panel/icons/filetypes/image.png', 'png' => DESIGNPATH . '_images_panel/icons/filetypes/image.png', 'jpg' => DESIGNPATH . '_images_panel/icons/filetypes/image.png', 'bmp' => DESIGNPATH . '_images_panel/icons/filetypes/image.png', 'txt' => DESIGNPATH . '_images_panel/icons/filetypes/text.png', 'doc' => DESIGNPATH . '_images_panel/icons/filetypes/text.png', 'rtf' => DESIGNPATH . '_images_panel/icons/filetypes/text.png', 'odt' => DESIGNPATH . '_images_panel/icons/filetypes/text.png', 'htm' => DESIGNPATH . '_images_panel/icons/filetypes/document.png', 'html' => DESIGNPATH . '_images_panel/icons/filetypes/document.png', 'php' => DESIGNPATH . '_images_panel/icons/filetypes/document.png');
 }
开发者ID:jmarceli,项目名称:WellCommerce,代码行数:17,代码来源:ColourSchemePicker.php

示例13: loadTranslations

    public static function loadTranslations()
    {
        if ((self::$translations = App::getRegistry()->cache->load('translations')) === FALSE) {
            $sql = 'SELECT 
						T.name,
						TD.translation 
					FROM translation T
					LEFT JOIN translationdata TD ON T.idtranslation = TD.translationid
					WHERE TD.languageid = :languageid';
            $stmt = Db::getInstance()->prepare($sql);
            $stmt->bindValue('languageid', Helper::getLanguageId());
            $stmt->execute();
            while ($rs = $stmt->fetch()) {
                self::$translations[$rs['name']] = htmlspecialchars($rs['translation'], ENT_QUOTES);
            }
            App::getRegistry()->cache->save('translations', self::$translations);
        }
    }
开发者ID:krisldz,项目名称:Gekosale2,代码行数:18,代码来源:Translation.php

示例14: load

    public static function load()
    {
        if ((self::$seocontrollers = App::getRegistry()->cache->load('seocontrollers')) === FALSE) {
            $sql = 'SELECT 
						C.name as name, 
						IF(CS.name IS NOT NULL, CS.name, C.name) as alias 
					FROM controller C
					LEFT JOIN controllerseo CS ON CS.controllerid = C.idcontroller
					WHERE CS.languageid = :languageid';
            $stmt = Db::getInstance()->prepare($sql);
            $stmt->bindValue('languageid', Helper::getLanguageId());
            $stmt->execute();
            while ($rs = $stmt->fetch()) {
                self::$seocontrollers[$rs['alias']] = $rs['name'];
            }
            App::getRegistry()->cache->save('seocontrollers', self::$seocontrollers);
        }
    }
开发者ID:krisldz,项目名称:Gekosale2,代码行数:18,代码来源:Seo.php

示例15: autoload

 public static function autoload($class)
 {
     $reg = App::getRegistry();
     if ($reg != null && preg_match("/" . preg_quote('Model') . '$/', $class)) {
         $modelName = end(explode('\\', strtolower(str_replace('Model', '', $class))));
         $reg->router->modelLoader($modelName, true);
     } else {
         if (substr($class, 0, 4) == 'Twig') {
             if (is_file($file = ROOTPATH . 'lib' . DS . 'Twig' . '/../' . str_replace(array('_', ""), array('/', ''), $class) . '.php')) {
                 require $file;
             }
         } else {
             $directories = array(__IMAGE_CLASS__, __DISPATCHER_CLASS__);
             $fileNameFormats = array('%s.class.php', '%s.php');
             $path = $class;
             if (@(include_once $path . '.php')) {
                 return;
             }
             $rootPathLen = strlen(ROOTPATH);
             foreach ($directories as $directory) {
                 foreach ($fileNameFormats as $fileNameFormat) {
                     $path = substr($directory, $rootPathLen) . sprintf($fileNameFormat, $class);
                     if (is_file(ROOTPATH . strtolower($path))) {
                         include_once ROOTPATH . strtolower($path);
                         return;
                     } else {
                         if (is_file(ROOTPATH . $path)) {
                             include_once ROOTPATH . $path;
                             return;
                         }
                     }
                 }
             }
         }
     }
 }
开发者ID:krisldz,项目名称:Gekosale2,代码行数:36,代码来源:Autoloader.php


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