/** * 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; }
public function __construct($content = array()) { parent::__construct($content); }
/** * @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()); }
/** * Get full user agent string * * @return string * * @codeCoverageIgnore */ public function userAgent() { return $this->headers->get('USER_AGENT'); }