__construct() private method

! Prohibit instantiation
private __construct ( )
Esempio n. 1
0
 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();
 }
Esempio n. 2
0
 public function __construct($settings)
 {
     // construct registry
     parent::__construct($settings);
     // create the default theme
     $this->Theme = new Theme($settings['theme_name']);
 }
Esempio n. 3
0
 public function __construct()
 {
     // initialize registry
     parent::__construct();
     // start with guest access
     $this['group'] = new Group();
     $this['authorized'] = false;
 }
Esempio n. 4
0
 public function __construct()
 {
     if (get_magic_quotes_gpc()) {
         $_REQUEST = array_map("stripslashes_deep", $_REQUEST);
     }
     // initialize registry
     parent::__construct($_REQUEST);
 }
Esempio n. 5
0
 public function __construct($ajax = false)
 {
     if ($ajax) {
         $this->path = urldecode($_SERVER['REQUEST_URI']);
         $this->registerServer();
     } else {
         parent::__construct();
     }
 }
Esempio n. 6
0
 /**
  * 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);
 }
 /**
  * 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);
 }
Esempio n. 8
0
 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);
         }
     }
 }
Esempio n. 9
0
 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);
 }
Esempio n. 10
0
 public function __construct()
 {
     // initialize registry
     parent::__construct();
 }
Esempio n. 11
0
 public function __construct($title)
 {
     // construct registry
     parent::__construct();
     $this->Title = $title;
 }
Esempio n. 12
0
 public function __construct()
 {
     // construct registry
     parent::__construct();
 }
Esempio n. 13
0
 public function __construct()
 {
     parent::__construct();
 }