Ejemplo n.º 1
0
 /**
  * Constructor
  */
 public function __construct($name = '', $cryptkey = '')
 {
     parent::__construct($cryptkey);
     $this->setName($name);
     $this->setPath('/');
     $this->setDomain(Server::getHost());
     $this->setSecure(Server::isSecure());
 }
Ejemplo n.º 2
0
 /**
  * Constructor
  */
 public function __construct($name = '', $expire = null)
 {
     // factory options
     $this->setOption('name', 'session');
     $this->setOption('cookie_lifetime', 0);
     $this->setOption('cookie_path', '/');
     $this->setOption('cookie_domain', Server::getHost());
     $this->setOption('cookie_secure', Server::isSecure());
     $this->setOption('cookie_httponly', true);
     $this->setOption('use_only_cookies', true);
     $this->setOption('use_trans_sid', false);
     $this->setOption('entropy_file', '/dev/urandom');
     $this->setOption('entropy_length', 256);
     $this->setOption('hash_function', 'sha256');
     $this->setOption('hash_bits_per_character', 6);
     $this->setOption('gc_maxlifetime', 86400);
     // 24h
     // set custom values
     $this->setName($name);
     $this->setExpire($expire);
 }
Ejemplo n.º 3
0
 /**
  * Constructor
  */
 public function __construct($name = "", $expire = null)
 {
     // factory options
     $this->setOption("name", "session");
     $this->setOption("cookie_lifetime", 0);
     $this->setOption("cookie_path", "/");
     $this->setOption("cookie_domain", Server::getHost());
     $this->setOption("cookie_secure", Connection::isSecure());
     $this->setOption("cookie_httponly", true);
     $this->setOption("use_only_cookies", true);
     $this->setOption("use_trans_sid", false);
     $this->setOption("entropy_file", "/dev/urandom");
     $this->setOption("entropy_length", 256);
     $this->setOption("hash_function", "sha256");
     $this->setOption("hash_bits_per_character", 6);
     $this->setOption("gc_maxlifetime", 86400);
     // 24h
     // set custom values
     $this->setName($name);
     $this->setExpire($expire);
 }
Ejemplo n.º 4
0
 /**
  * Builds and returns error output data for views
  */
 private function _getOutputData($full = true)
 {
     $output = array('status' => $this->_status_code, 'info' => $this->_error_type, 'error' => $this->_error_message, 'file' => $this->_relativePath($this->_error_file), 'line' => $this->_error_line, 'date' => date('r'), 'url' => Server::getUrl(), 'host' => Server::getHost(), 'domain' => Server::getDomain(), 'memory' => Numeric::toSize(memory_get_peak_usage(true)), 'speed' => $this->_getRuntimeSpeed());
     if ($full === true) {
         $output['headers'] = getallheaders();
         if (!empty($this->_error_backtrace)) {
             $output['trace'] = $this->_getBacktrace();
         }
         if (!empty($this->_error_file) && !empty($this->_error_line)) {
             $output['source'] = $this->_getSourceCode($this->_error_file, $this->_error_line);
         }
     }
     return $output;
 }