本文整理汇总了PHP中Bootstrap::__construct方法的典型用法代码示例。如果您正苦于以下问题:PHP Bootstrap::__construct方法的具体用法?PHP Bootstrap::__construct怎么用?PHP Bootstrap::__construct使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Bootstrap
的用法示例。
在下文中一共展示了Bootstrap::__construct方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __construct
/**
* Initializes the entire admin app
* @access public
*/
public function __construct($config)
{
// call the bootstrap function to initialize everything
parent::__construct($config);
// if new display settings are set in the url, save them to the database
if ($this->params->get->getElemId('sort_location') && $this->params->get->getElemId('sort_by')) {
$this->prefs->addSort($this->params->get->getElemId('sort_location'), $this->params->get->getElemId('sort_by'), $this->params->get->getElemId('sort_direction'));
}
if ($this->config('enable_authentication_support')) {
// load all default user preferences
if ($this->params->session->getInt('user_id')) {
$this->prefs->loadUserPreferences();
}
// determine if the current user is an admin
define('IS_ADMIN', $this->user->userHasGlobalAccess());
// determine if this a one-user system or not
define('MULTIPLE_USERS', $this->user->userAccountCount() == 1 ? false : true);
} else {
define('IS_ADMIN', false);
define('MULTIPLE_USERS', false);
}
// set the referring page unless we're POSTing
$post_set = $this->params->getRawSource('post');
if (!$post_set) {
$this->router->setReturnToReferrer();
}
// load a module based off of parameters in the URL
$this->router->loadFromUrl();
// end logging
$end = Date::microtime();
$this->log->write('Application request completed at ' . Date::formatMicrotime($end));
$this->log->write('Time Spent: ' . ($end - Date::microtime(EXECUTION_START)) . ' seconds');
}
示例2: __construct
public function __construct($config)
{
parent::__construct($config);
define('PATH_HOME', PATH_TRUNK . 'workflow' . PATH_SEP);
define('PATH_OUTTRUNK', realpath(PATH_TRUNK . '../') . PATH_SEP);
require_once PATH_HOME . 'engine/config/paths.php';
//if (php_sapi_name() !== 'cli') {
session_start();
// starting session
//}
}
示例3: __construct
/**
* Constructor
* Attention: MUST NOT BE CALLED DIRECTLY! USE get_instance() INSTEAD!
*
* @author peshkov@UD
*/
protected function __construct($args)
{
parent::__construct($args);
//** Load text domain */
add_action('after_setup_theme', array($this, 'load_textdomain'), 1);
//** TGM Plugin activation. */
$this->check_plugins_requirements();
//** May be initialize Licenses Manager. */
$this->define_license_manager();
//** Maybe define license client */
$this->define_license_client();
add_action('after_setup_theme', array($this, 'pre_init'), 100);
$this->boot();
}
示例4: __construct
/**
* Constructor
* Attention: MUST NOT BE CALLED DIRECTLY! USE get_instance() INSTEAD!
*
* @author peshkov@UD
*/
protected function __construct($args)
{
parent::__construct($args);
//** Maybe define license client */
$this->define_license_client();
//** Load text domain */
add_action('plugins_loaded', array($this, 'load_textdomain'), 1);
//** May be initialize Licenses Manager. */
add_action('plugins_loaded', array($this, 'define_license_manager'), 1);
//** Initialize plugin here. All plugin actions must be added on this step */
add_action('plugins_loaded', array($this, 'pre_init'), 100);
//** TGM Plugin activation. */
add_action('plugins_loaded', array($this, 'check_plugins_requirements'), 10);
$this->boot();
}
示例5: __construct
/**
* @abstract Constructor, initializes the module
* @return Cms
* @access public
*/
public function __construct($config)
{
parent::__construct($config);
// ensure the cms has been installed
if (!$this->isInstalled()) {
print 'This application must be installed before you may use it. Please follow the documentation for installation.';
exit;
}
// determine if the current user is an admin
define('IS_ADMIN', $this->user->userHasGlobalAccess());
// load pages module, and any module hooks
// $this->loadModule('c3f28790-269f-11dd-bd0b-0800200c9a66');
// run all init commands from library
$this->cms_lib->load();
// load the template, display the page
$this->displayPage();
}
示例6: __construct
public function __construct($plugin_version, $plugins_url)
{
parent::__construct($plugin_version, $plugins_url);
}
示例7: __construct
public function __construct()
{
parent::__construct();
}