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


PHP App::getRegistry方法代码示例

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


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

示例1: __construct

 public function __construct($type, $field, $condition, $argument = null)
 {
     $this->_argument = $argument;
     $this->type = $type;
     $this->registry = App::getRegistry();
     if (is_object($condition) && is_subclass_of($condition, 'FormEngine\\Condition')) {
         $this->_condition = $condition;
     } else {
         $this->_srcFunction = $condition;
         $this->_id = self::$_nextId++;
         switch ($this->type) {
             case self::EXCHANGE_OPTIONS:
                 $this->_jsFunction = 'GetOptions_' . $this->_id;
                 $this->registry->xajax->registerFunction(array($this->_jsFunction, $this, 'doAjaxOptionsRequest_' . $this->_id));
                 break;
             case self::INVOKE_CUSTOM_FUNCTION:
                 $this->_jsFunction = $condition;
                 break;
             case self::SUGGEST:
                 $this->_jsFunction = 'GetSuggestions_' . $this->_id;
                 $this->registry->xajax->registerFunction(array($this->_jsFunction, $this, 'doAjaxSuggestionRequest_' . $this->_id));
         }
     }
     $this->_field = $field;
 }
开发者ID:krisldz,项目名称:Gekosale2,代码行数:25,代码来源:Dependency.php

示例2: __construct

 public function __construct($errorMsg, $checkFunctionCallback, $params = array())
 {
     parent::__construct($errorMsg);
     $this->_checkFunction = $checkFunctionCallback;
     $this->_jsFunction = App::getRegistry()->xajaxInterface->registerFunction(array('CheckCustomRule_' . self::$_nextId++, $this, 'doAjaxCheck'));
     $this->_params = $params;
 }
开发者ID:krisldz,项目名称:Gekosale2,代码行数:7,代码来源:Custom.php

示例3: __construct

 public function __construct($attributes)
 {
     parent::__construct($attributes);
     $this->_attributes['load'] = App::getRegistry()->xajaxInterface->registerFunction(array('ProgressIndicator_OnLoad_' . $this->_id, $this->_attributes['load'][0], $this->_attributes['load'][1]));
     $this->_attributes['process'] = App::getRegistry()->xajaxInterface->registerFunction(array('ProgressIndicator_OnProcess_' . $this->_id, $this->_attributes['process'][0], $this->_attributes['process'][1]));
     $this->_attributes['success'] = App::getRegistry()->xajaxInterface->registerFunction(array('ProgressIndicator_OnSuccess_' . $this->_id, $this->_attributes['success'][0], $this->_attributes['success'][1]));
 }
开发者ID:krisldz,项目名称:Gekosale2,代码行数:7,代码来源:ProgressIndicator.php

示例4: __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['get_attributes_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:krisldz,项目名称:Gekosale2,代码行数:30,代码来源:ProductVariantsEditor.php

示例5: __construct

 public function __construct($attributes)
 {
     parent::__construct($attributes);
     $this->_attributes['session_name'] = session_name();
     $this->_attributes['session_id'] = session_id();
     $this->_jsFunction = 'LoadFiles_' . $this->_id;
     $this->_attributes['load_handler'] = 'xajax_' . $this->_jsFunction;
     App::getRegistry()->xajax->registerFunction(array($this->_jsFunction, $this, 'doLoadFilesForDatagrid_' . $this->_id));
 }
开发者ID:krisldz,项目名称:Gekosale2,代码行数:9,代码来源:File.php

示例6: __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_category_children'] = App::getRegistry()->xajaxInterface->registerFunction(array('LoadCategoryChildren_' . $this->_id, $this, 'loadCategoryChildren'));
     $this->_attributes['datagrid_filter'] = $this->getDatagridFilterData();
 }
开发者ID:krisldz,项目名称:Gekosale2,代码行数:9,代码来源:OrderEditor.php

示例7: registerFunction

 public function registerFunction($registrationArray)
 {
     $name = array_shift($registrationArray);
     $callback = $registrationArray;
     $callbackName = '_auto_callback_' . $this->autoId++;
     $this->registerCallback($callbackName, $callback);
     App::getRegistry()->xajax->registerFunction(array($name, $this, $callbackName));
     return 'xajax_' . $name;
 }
开发者ID:krisldz,项目名称:Gekosale2,代码行数:9,代码来源:XajaxInterface.php

示例8: __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:krisldz,项目名称:Gekosale2,代码行数:10,代码来源:ClientSelect.php

示例9: __construct

 public function __construct($errorMsg, $table, $column, $valueProcessFunction = null, $exclude = null)
 {
     parent::__construct($errorMsg);
     $this->_table = $table;
     $this->_column = $column;
     $this->_exclude = $exclude;
     $this->_id = self::$_nextId++;
     $this->_valueProcessFunction = $valueProcessFunction;
     $this->_jsFunction = 'CheckUniqueness_' . $this->_id;
     App::getRegistry()->xajaxInterface->registerFunction(array($this->_jsFunction, $this, 'doAjaxCheck'));
 }
开发者ID:krisldz,项目名称:Gekosale2,代码行数:11,代码来源:Unique.php

示例10: Render_JS

 public function Render_JS($loadJs = true)
 {
     $render = '';
     if ($loadJs) {
         if (is_object(App::getRegistry()->router) && App::getRegistry()->router->getMode() == 0 && !in_array(App::getRegistry()->router->getCurrentController(), array('login', 'forgotlogin'))) {
             $render = '<script type="text/javascript" src="' . DESIGNPATH . '_js_frontend/core/gform.js"></script>';
         }
     }
     $render .= "\n\t\t\t<form id=\"{$this->_attributes['name']}\" method=\"{$this->_attributes['method']}\" action=\"{$this->_attributes['action']}\">\n\t\t\t\t<input type=\"hidden\" name=\"{$this->_attributes['name']}_submitted\" value=\"1\"/>\n\t\t\t</form>\n\t\t\t<script type=\"text/javascript\">\n\t\t\t\t/*<![CDATA[*/\n\t\t\t\t\tGCore.OnLoad(function() {\n\t\t\t\t\t\t\$('#{$this->_attributes['name']}').GForm({\n\t\t\t\t\t\t\tsFormName: '{$this->_attributes['name']}',\n\t\t\t\t\t\t\tsClass: '{$this->_attributes['class']}',\n\t\t\t\t\t\t\tiTabs: " . ($this->_attributes['tabs'] == self::TABS_VERTICAL ? 'GForm.TABS_VERTICAL' : 'GForm.TABS_HORIZONTAL') . ",\n\t\t\t\t\t\t\taoFields: [\n\t\t\t\t\t\t\t\t{$this->_RenderChildren()}\n\t\t\t\t\t\t\t],\n\t\t\t\t\t\t\toValues: " . json_encode($this->GetValues()) . ",\n\t\t\t\t\t\t\toErrors: " . json_encode($this->GetErrors()) . "\n\t\t\t\t\t\t});\n\t\t\t\t\t});\n\t\t\t\t/*]]>*/\n\t\t\t</script>\n\t\t";
     return $render;
 }
开发者ID:krisldz,项目名称:Gekosale2,代码行数:11,代码来源:Form.php

示例11: load

 protected static function load()
 {
     if ((self::$events = App::getRegistry()->cache->load('events')) === FALSE) {
         $sql = 'SELECT * FROM event';
         $stmt = Db::getInstance()->prepare($sql);
         $stmt->execute();
         while ($rs = $stmt->fetch()) {
             self::$events[] = array('name' => $rs['name'], 'model' => $rs['model'], 'method' => $rs['method'], 'mode' => $rs['mode']);
         }
         App::getRegistry()->cache->save('events', self::$events);
     }
 }
开发者ID:krisldz,项目名称:Gekosale2,代码行数:12,代码来源:Event.php

示例12: __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:krisldz,项目名称:Gekosale2,代码行数:13,代码来源:ProductAggregator.php

示例13: deleteAttribute

 public function deleteAttribute($request)
 {
     $status = true;
     $message = '';
     $db = App::getRegistry()->db;
     try {
         App::getModel('attributegroup')->RemoveAttributeFromGroup($request['id'], $request['set_id']);
         App::getModel('attributegroup')->DeleteAttribute($request['id']);
     } catch (Exception $e) {
         $status = false;
         $message = $e->getMessage();
     }
     return array('status' => $status, 'message' => $message);
 }
开发者ID:krisldz,项目名称:Gekosale2,代码行数:14,代码来源:AttributeEditor.php

示例14: __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_category_children'] = 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:krisldz,项目名称:Gekosale2,代码行数:15,代码来源:ProductSelectRelated.php

示例15: __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:krisldz,项目名称:Gekosale2,代码行数:16,代码来源:DatagridSelect.php


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