本文整理汇总了PHP中Solar_Base::_postConstruct方法的典型用法代码示例。如果您正苦于以下问题:PHP Solar_Base::_postConstruct方法的具体用法?PHP Solar_Base::_postConstruct怎么用?PHP Solar_Base::_postConstruct使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Solar_Base
的用法示例。
在下文中一共展示了Solar_Base::_postConstruct方法的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']);
}
}
示例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']);
}
示例3: _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));
}
示例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));
$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')));
}
示例5: _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'];
}
示例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']);
}
示例7: _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);
}
}
示例8: _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();
}
示例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));
}
示例10: _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');
}
示例11: _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();
}
示例12: _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();
}
示例13: _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 up the data-filter class
$this->_filter = Solar::factory($this->_config['filter_class']);
}
示例14: _postConstruct
/**
*
* Post-construction tasks to complete object construction.
*
* @return void
*
*/
protected function _postConstruct()
{
parent::_postConstruct();
$this->reset();
}
示例15: _postConstruct
/**
*
* Post-construction tasks to complete object construction.
*
* @return void
*
*/
protected function _postConstruct()
{
parent::_postConstruct();
// Establish the state of this object before _setup
$this->_preSetup();
// user-defined setup
$this->_setup();
// Complete the setup of this model
$this->_postSetup();
}