Example #1
0
 /**
  * @param string $cookie_name
  * @param mixed  $value
  * @param int    $life_time
  * @param string $path
  * @param string $domain
  * @param bool   $secure
  * @param bool   $http_only
  *
  * @return $this
  */
 public function set($cookie_name, $value, $life_time = 0, $path = '/', $domain = '', $secure = false, $http_only = false)
 {
     $params = func_get_args();
     parent::set(array_shift($params), array_shift($params));
     foreach ($this->params as $index => $param_name) {
         if (isset($params[$index])) {
             $this->param_values[$cookie_name][$param_name] = $params[$index];
         }
     }
     return $this;
 }
Example #2
0
 /**
  * @param string $key
  * @param mixed  $value
  * @param bool   $replace
  *
  * @return $this
  */
 public function set($key, $value, $replace = true)
 {
     if (!$replace) {
         $old_value = $this->get($key);
         if (is_array($old_value)) {
             $value = $old_value + [$value];
         } elseif ($old_value !== null) {
             $value = [$old_value, $value];
         }
     }
     return parent::set($key, $value);
 }
Example #3
0
 /**
  * @param IConfig      $OutputConfig
  * @param HeaderOutput $HeaderOutput
  */
 public function __construct(IConfig $OutputConfig, HeaderOutput $HeaderOutput)
 {
     parent::__construct($OutputConfig);
     $this->header_output = $HeaderOutput;
 }
Example #4
0
 /**
  * @param IConfig      $OutputConfig
  * @param HeaderOutput $HeaderOutput
  * @param IInput       $RequestInfo
  */
 public function __construct(IConfig $OutputConfig, HeaderOutput $HeaderOutput, IInput $RequestInfo)
 {
     parent::__construct($OutputConfig);
     $this->header_output = $HeaderOutput;
     $this->request_info = $RequestInfo;
 }