示例#1
0
文件: Request.php 项目: yeephp/yeephp
 /**
  * Fetch COOKIE data
  *
  * This method returns a key-value array of Cookie data sent in the HTTP request, or
  * the value of a array key if requested; if the array key does not exist, NULL is returned.
  *
  * @param  string            $key
  * @return array|string|null
  */
 public function cookies($key = null)
 {
     if ($key) {
         return $this->cookies->get($key);
     }
     return $this->cookies;
 }
示例#2
0
文件: View.php 项目: yeephp/yeephp
 /**
  * Return view data value with key
  * @param  string $key
  * @return mixed
  */
 public function get($key)
 {
     return $this->data->get($key);
 }