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


PHP Registry::__construct方法代码示例

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


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

示例1: __construct

 public function __construct()
 {
     // must come before registry construction
     session_start();
     session_regenerate_id();
     // initialize registry
     parent::__construct($_SESSION);
     // session exists
     if ($this['generated']) {
         // session expired (x minutes) - start from scratch
         if (time() - $this['generated'] > 30 * 60) {
             unset($this['username']);
             unset($this['password']);
             $this['status'] = 2;
         }
     } else {
         // if no session is found
         if ($this['status'] === false) {
             $this['status'] = 6;
         }
     }
     $this['status_old'] = $this['status'];
     // reset session timeout
     $this['generated'] = time();
 }
开发者ID:ericmuyser,项目名称:web2f,代码行数:25,代码来源:Session.class.php

示例2: __construct

 public function __construct($settings)
 {
     // construct registry
     parent::__construct($settings);
     // create the default theme
     $this->Theme = new Theme($settings['theme_name']);
 }
开发者ID:ericmuyser,项目名称:web2f,代码行数:7,代码来源:Site.class.php

示例3: __construct

 public function __construct()
 {
     // initialize registry
     parent::__construct();
     // start with guest access
     $this['group'] = new Group();
     $this['authorized'] = false;
 }
开发者ID:ericmuyser,项目名称:web2f,代码行数:8,代码来源:User.class.php

示例4: __construct

 public function __construct()
 {
     if (get_magic_quotes_gpc()) {
         $_REQUEST = array_map("stripslashes_deep", $_REQUEST);
     }
     // initialize registry
     parent::__construct($_REQUEST);
 }
开发者ID:ericmuyser,项目名称:web2f,代码行数:8,代码来源:Request.class.php

示例5: __construct

 public function __construct($ajax = false)
 {
     if ($ajax) {
         $this->path = urldecode($_SERVER['REQUEST_URI']);
         $this->registerServer();
     } else {
         parent::__construct();
     }
 }
开发者ID:shaunfreeman,项目名称:Uthando-CMS,代码行数:9,代码来源:Registry.php

示例6: __construct

 /**
  * Create a new configuration repository.
  *
  * @param   object  $loader
  * @param   string  $client
  * @return  void
  */
 public function __construct($client, $loader = null)
 {
     if (!$loader) {
         $loader = new \Hubzero\Config\FileLoader(PATH_APP . DS . 'config');
     }
     $this->loader = $loader;
     $this->client = $client;
     $items = $this->load($this->client);
     parent::__construct($items);
 }
开发者ID:mined-gatech,项目名称:hubzero-cms,代码行数:17,代码来源:Repository.php

示例7: __construct

 /**
  * constructor : reads the config file an set up the variables
  *
  * @param string $file file name
  * @param string $enviroment name of enviroment to read variables
  *
  * @return void
  */
 protected function __construct($basePath = null)
 {
     session_cache_expire(3600);
     if (!session_id()) {
         session_start();
     }
     if (isset($_SESSION['timeout_idle']) && $_SESSION['timeout_idle'] < time()) {
         session_destroy();
         session_regenerate_id();
     }
     $_SESSION['timeout_idle'] = time() + session_cache_expire();
     parent::__construct($basePath);
 }
开发者ID:dianadevargas,项目名称:php-framework,代码行数:21,代码来源:sessionRegistry.php

示例8: __construct

 public function __construct($lang)
 {
     //if(is_string($lang))
     //{
     //	$sl_path = G::$Engine->Site->Path . "/modules/" . $module . "/lang/" . G::$Engine->Site['language'] . "/" . $file;
     //	$en_path = G::$Engine->Site->Path . "/modules/" . $module . "/lang/" . "en" . "/" . $file;
     //
     //	$lang = file_exists($sl_path) ? G::$Engine->LoadFile($sl_path) : file_exists($en_path) ? $this->Lang->Add($en_path) : 0;
     //}
     if (is_string($lang)) {
         // initialize registry
         parent::__construct();
         $this->Filename = $lang;
     } else {
         if (is_array($lang)) {
             // initialize registry
             parent::__construct($lang);
         } else {
             throw new Exception("Attempted to load bad language file", 69);
         }
     }
 }
开发者ID:ericmuyser,项目名称:web2f,代码行数:22,代码来源:Language.class.php

示例9: __construct

 public function __construct($settings)
 {
     //--------------------------------
     // Initialize settings
     //--------------------------------
     //$settings['requesturl'] = (!empty($_SERVER['HTTPS'])) ? "https://" . $_SERVER['SERVER_NAME'] . $_SERVER['REQUEST_URI'] : "http://" . $_SERVER['SERVER_NAME'] . $_SERVER['REQUEST_URI'];
     $settings['requesturl'] = "http://" . $_SERVER['SERVER_NAME'] . $_SERVER['REQUEST_URI'];
     $settings['title'] = array($settings['title']);
     //--------------------------------
     // Initialize header settings
     //--------------------------------
     $settings['headers'] = array();
     $settings['headers']['Expires'] = "Sun, 19 nov 1978 05:00:00 GMT";
     $settings['headers']['Last-Modified'] = gmdate("D, d M Y H:i:s") . " GMT";
     $settings['headers']['Cache-Control'] = "no-store, no-cache, must-revalidate, post-check=0, pre-check=0";
     $settings['headers']['Pragma'] = "no-cache";
     //--------------------------------
     // Save settings
     //--------------------------------
     // construct registry
     parent::__construct($settings);
 }
开发者ID:ericmuyser,项目名称:web2f,代码行数:22,代码来源:Page.class.php

示例10: __construct

 public function __construct()
 {
     // initialize registry
     parent::__construct();
 }
开发者ID:ericmuyser,项目名称:web2f,代码行数:5,代码来源:Lang.class.php

示例11: __construct

 public function __construct($title)
 {
     // construct registry
     parent::__construct();
     $this->Title = $title;
 }
开发者ID:ericmuyser,项目名称:web2f,代码行数:6,代码来源:Section.class.php


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