예제 #1
0
 public function setLocation($location)
 {
     if ($location instanceof Uri) {
         $location = $location->build();
     }
     $this->location = $location;
     $this->setHeader(HeaderType::LOCATION(), $location);
     return $this;
 }
예제 #2
0
 public function __construct()
 {
     $this->setHeader(HeaderType::CONTENT_TYPE(), "application/xml");
 }
예제 #3
0
 public function __construct()
 {
     $this->setHeader(HeaderType::CONTENT_TYPE(), "text/x-yaml");
 }
예제 #4
0
 /**
  * @param unknown $length
  */
 public function cache($length)
 {
     $this->setHeader(HeaderType::EXPIRES(), "max-age=" . gmdate("D, d M Y H:i:s", time() + $length));
     $this->setHeader(HeaderType::CACHE_CONTROL(), "max-age=" . $length);
     $this->setHeader(HeaderType::PRAGMA(), "cache");
     return $this;
 }