request = $request; return $this; } public function getRequest() { return $this->request; } public function getHeaders() { return array(); } public function setCacheDurationInSeconds($duration) { $this->cacheable = $duration; return $this; } public function setHTTPResponseCode($code) { $this->responseCode = $code; return $this; } public function getHTTPResponseCode() { return $this->responseCode; } public function getCacheHeaders() { if ($this->cacheable) { $epoch = time() + $this->cacheable; return array( array('Expires', gmdate('D, d M Y H:i:s', $epoch) . ' GMT'), ); } else { return array( array('Cache-Control', 'private, no-cache, no-store, must-revalidate'), array('Expires', 'Sat, 01 Jan 2000 00:00:00 GMT'), ); } } abstract public function buildResponseString(); }