當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Solar_Base類代碼示例

本文整理匯總了PHP中Solar_Base的典型用法代碼示例。如果您正苦於以下問題:PHP Solar_Base類的具體用法?PHP Solar_Base怎麽用?PHP Solar_Base使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


在下文中一共展示了Solar_Base類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: _postConstruct

 /**
  * 
  * Post-construction tasks to complete object construction.
  * 
  * @return void
  * 
  */
 protected function _postConstruct()
 {
     parent::_postConstruct();
     if (!empty($this->_config['events'])) {
         $this->setEvents($this->_config['events']);
     }
 }
開發者ID:kalkin,項目名稱:solarphp,代碼行數:14,代碼來源:Adapter.php

示例2: _postConstruct

 /**
  * 
  * Post-construction tasks to complete object construction.
  * 
  * @return void
  * 
  */
 protected function _postConstruct()
 {
     parent::_postConstruct();
     // inflection dependency
     $this->_inflect = Solar::dependency('Solar_Inflect', 'inflect');
     // model stack
     $this->_setStack($this->_config['classes']);
 }
開發者ID:kalkin,項目名稱:solarphp,代碼行數:15,代碼來源:Catalog.php

示例3: _postConfig

 /**
  * 
  * Modifies $this->_config after it has been built.
  * 
  * @return void
  * 
  */
 protected function _postConfig()
 {
     parent::_postConfig();
     if (empty($this->_config['output'])) {
         $mode = PHP_SAPI == 'cli' ? 'text' : 'html';
         $this->_config['output'] = $mode;
     }
 }
開發者ID:btweedy,項目名稱:foresmo,代碼行數:15,代碼來源:Var.php

示例4: _postConstruct

 /**
  * _postConstruct
  *
  * @param $model
  */
 protected function _postConstruct()
 {
     parent::_postConstruct();
     $this->_model = $this->_config['model'];
     $this->_view_path = Solar_Class::dir($this, 'View');
     $this->_view_file = 'index.php';
     $this->_view = Solar::factory('Solar_View', array('template_path' => $this->_view_path));
 }
開發者ID:btweedy,項目名稱:foresmo,代碼行數:13,代碼來源:Links.php

示例5: _postConstruct

 /**
  * _postConstruct
  *
  * @param $model
  */
 protected function _postConstruct()
 {
     parent::_postConstruct();
     $this->_model = $this->_config['model'];
     $this->_view_path = Solar_Class::dir($this, 'View');
     $this->_view_file = 'index.php';
     $this->_view = Solar::factory('Solar_View', array('template_path' => $this->_view_path));
     $this->register = array('_preRender' => array('index' => array('main' => 'preRender')), '_postRender' => array('index' => array('main' => 'postRender')), '_preRun' => array('index' => array('main' => 'preRun')), '_postRun' => array('index' => array('main' => 'postRun')), '_postAction' => array('index' => array('main' => 'postAction')));
 }
開發者ID:btweedy,項目名稱:foresmo,代碼行數:14,代碼來源:Pages.php

示例6: _postConstruct

 /**
  * 
  * Post-construction tasks to complete object construction.
  * 
  * @return void
  * 
  */
 protected function _postConstruct()
 {
     parent::_postConstruct();
     if (empty($this->_config['_view']) || !$this->_config['_view'] instanceof Solar_View) {
         // we need the parent view object
         throw Solar::exception(get_class($this), 'ERR_VIEW_NOT_SET', "Config key '_view' not set, or not Solar_View object");
     }
     $this->_view = $this->_config['_view'];
     unset($this->_config['_view']);
 }
開發者ID:btweedy,項目名稱:foresmo,代碼行數:17,代碼來源:Helper.php

示例7: _postConstruct

 /**
  * 
  * Post-construction tasks to complete object construction.
  * 
  * @return void
  * 
  */
 protected function _postConstruct()
 {
     parent::_postConstruct();
     // keep the cache active flag
     $this->_active = (bool) $this->_config['active'];
     // keep the cache lifetime value
     $this->_life = (int) $this->_config['life'];
     // keep the cache entry prefix
     $this->_prefix = (string) $this->_config['prefix'];
 }
開發者ID:agentile,項目名稱:foresmo,代碼行數:17,代碼來源:Adapter.php

示例8: _postConstruct

 /**
  * 
  * Post-construction tasks to complete object construction.
  * 
  * @return void
  * 
  */
 protected function _postConstruct()
 {
     parent::_postConstruct();
     if ($this->_config['base']) {
         $this->setBase($base);
     } else {
         $base = $this->_findBaseByClass(__CLASS__);
         $this->setBase($base);
     }
 }
開發者ID:agentile,項目名稱:foresmo,代碼行數:17,代碼來源:Map.php

示例9: _postConstruct

 /**
  * _postConstruct
  *
  * @param $model
  */
 protected function _postConstruct()
 {
     parent::_postConstruct();
     $this->_model = $this->_config['model'];
     if (isset($_SERVER['DOCUMENT_ROOT'])) {
         $web_root = $_SERVER['DOCUMENT_ROOT'];
     } else {
         $web_root = Solar::$system . '/docroot/';
     }
     $this->_view_path = $web_root . 'modules/' . $this->name . '/View';
     $this->_view_file = 'index.php';
     $this->_view = Solar::factory('Solar_View', array('template_path' => $this->_view_path));
 }
開發者ID:agentile,項目名稱:foresmo,代碼行數:18,代碼來源:Tags.php

示例10: _postConstruct

 /**
  * 
  * Post-construction tasks to complete object construction.
  * 
  * @return void
  * 
  */
 protected function _postConstruct()
 {
     parent::_postConstruct();
     // stdout and stderr
     $this->_stdout = fopen('php://stdout', 'w');
     $this->_stderr = fopen('php://stderr', 'w');
     // set the recognized options
     $options = $this->_fetchGetoptOptions();
     $this->_getopt = Solar::factory('Solar_Getopt');
     $this->_getopt->setOptions($options);
     // follow-on setup
     $this->_setup();
 }
開發者ID:kalkin,項目名稱:solarphp,代碼行數:20,代碼來源:Command.php

示例11: _postConstruct

 /**
  * _postConstruct
  *
  * @param $model
  */
 protected function _postConstruct()
 {
     parent::_postConstruct();
     $this->_model = $this->_config['model'];
     $this->web_root = isset($_SERVER['DOCUMENT_ROOT']) ? $_SERVER['DOCUMENT_ROOT'] : Solar::$system . DIRECTORY_SEPARATOR . 'docroot' . DIRECTORY_SEPARATOR;
     $this->web_root = Solar_Dir::fix($this->web_root);
     $class_arr = explode('_', get_class($this));
     $this->_module_name = end($class_arr);
     $this->_module_info = $this->_model->modules->fetchModuleInfoByName($this->_module_name);
     $this->_setViewPath();
     $this->_setViewFile();
     $this->_setView();
     $this->_view->addHelperClass('Foresmo_View_Helper');
 }
開發者ID:agentile,項目名稱:foresmo,代碼行數:19,代碼來源:Base.php

示例12: _postConstruct

 /**
  * 
  * Post-construction tasks to complete object construction.
  * 
  * @return void
  * 
  */
 protected function _postConstruct()
 {
     parent::_postConstruct();
     // get the current request environment
     $this->_request = Solar_Registry::get('request');
     // set convenience vars from config
     $this->_routing = $this->_config['routing'];
     $this->_default = $this->_config['default'];
     $this->_disable = (array) $this->_config['disable'];
     // set up a class stack for finding commands
     $this->_stack = Solar::factory('Solar_Class_Stack');
     $this->_stack->add($this->_config['classes']);
     // extended setup
     $this->_setup();
 }
開發者ID:agentile,項目名稱:foresmo,代碼行數:22,代碼來源:Console.php

示例13: _postConstruct

 /**
  * 
  * Post-construction tasks to complete object construction.
  * 
  * @return void
  * 
  */
 protected function _postConstruct()
 {
     parent::_postConstruct();
     // setup
     $this->_setup();
     // start up authentication
     $this->_authStart();
     // is this a valid authenticated user?
     if ($this->auth->isValid()) {
         $this->_loadRoles();
     } else {
         // no, user is not valid.
         // clear out any previous roles.
         $this->role->reset();
         $this->access->reset();
     }
     // load up the access list for the handle and roles
     $this->_loadAccess();
 }
開發者ID:kalkin,項目名稱:solarphp,代碼行數:26,代碼來源:User.php

示例14: _chainLocale

 /**
  * 
  * Uses the chain locale object to get translations before falling back
  * to this object for locale.
  * 
  * @param string $key The translation key, typically a validation method
  * name.
  * 
  * @return string
  * 
  */
 protected function _chainLocale($key)
 {
     // the translated message; default to the translation key.
     $msg = $key;
     // if we have a locale object, get a message from it
     if ($this->_chain_locale_object) {
         // try to translate
         $msg = $this->_chain_locale_object->locale($key);
         // if the key failed to translate, fall back to the
         // translations from $this, but only if $this wasn't
         // the source to begin with.
         $failed = $msg === null || $msg == $key;
         if ($failed && $this != $this->_chain_locale_object) {
             $msg = $this->locale($key);
         }
     }
     // done
     return $msg;
 }
開發者ID:kdambekalns,項目名稱:framework-benchs,代碼行數:30,代碼來源:Filter.php

示例15: _postConstruct

 /**
  * 
  * Post-construction tasks to complete object construction.
  * 
  * @return void
  * 
  */
 protected function _postConstruct()
 {
     parent::_postConstruct();
     // get the current request environment
     $this->_request = Solar_Registry::get('request');
 }
開發者ID:kalkin,項目名稱:solarphp,代碼行數:13,代碼來源:Login.php


注:本文中的Solar_Base類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。