/** * @param string $file * @param string $mime * @param array $headers */ public function __construct(\Fuel\FileSystem\File $file, array $headers = []) { // process the passed data if (!$file->exists()) { throw new NotFound(); } if (!$file->isReadable()) { throw new Forbidden(); } $this->setContentType($file->getMimeType()); parent::__construct($file, 200, $headers); }
/** * @param string $content * @param string $contentType * @param integer $status * @param array $headers */ public function __construct($content = '', $contentType = 'application/octet-stream', $status = 200, array $headers = []) { $this->setContentType($contentType); parent::__construct($content, $status, $headers); }