Ejemplo n.º 1
0
 /**
  * Enable (or disable when false is given) the cache.
  *
  * @param bool $enabled default true.
  *
  * @return Response
  */
 public function cache($enabled = true)
 {
     if (!$enabled) {
         $this->header('Pragma', 'no-cache');
         $this->header('Cache-Control', 'no-store, no-cache');
         return $this;
     }
     $this->headers->remove('Pragma');
     $this->headers->remove('Cache-Control');
     return $this;
 }
Ejemplo n.º 2
0
 public function __construct($content = array())
 {
     parent::__construct($content);
 }
Ejemplo n.º 3
0
 /**
  * @covers ::__construct
  * @covers ::append
  */
 public function testAppend()
 {
     $collection = new DataCollection();
     $collection->append('first');
     $collection->append('second');
     $this->assertEquals(array(0 => 'first', 1 => 'second'), $collection->all());
 }
Ejemplo n.º 4
0
 /**
  * Get full user agent string
  *
  * @return string
  *
  * @codeCoverageIgnore
  */
 public function userAgent()
 {
     return $this->headers->get('USER_AGENT');
 }