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


PHP Bootstrap::__construct方法代码示例

本文整理汇总了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');
 }
开发者ID:viveleroi,项目名称:AspenMSM,代码行数:37,代码来源:App.php

示例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
     //}
 }
开发者ID:rodrigoivan,项目名称:processmaker,代码行数:11,代码来源:PmBootstrap.php

示例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();
 }
开发者ID:ksan5835,项目名称:rankproperties,代码行数:20,代码来源:class-bootstrap-theme.php

示例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();
 }
开发者ID:ksan5835,项目名称:rankproperties,代码行数:21,代码来源:class-bootstrap-plugin.php

示例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();
 }
开发者ID:viveleroi,项目名称:AspenMSM,代码行数:22,代码来源:Cms.php

示例6: __construct

 public function __construct($plugin_version, $plugins_url)
 {
     parent::__construct($plugin_version, $plugins_url);
 }
开发者ID:KansaiOpenDataActivityList,项目名称:expo15.theodi.jp,代码行数:4,代码来源:bootstrap2.php

示例7: __construct

 public function __construct()
 {
     parent::__construct();
 }
开发者ID:rendix2,项目名称:QW_MVS,代码行数:4,代码来源:LanguageBootstrap.php


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