From 11858be4e8d5aba983700c6cba1c4d0a33ea8e9d Mon Sep 17 00:00:00 2001 From: Frederic Guillot Date: Sat, 9 Apr 2016 22:42:17 -0400 Subject: Filter refactoring --- app/Core/Http/Response.php | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'app/Core/Http') diff --git a/app/Core/Http/Response.php b/app/Core/Http/Response.php index 37349ca5..996fc58d 100644 --- a/app/Core/Http/Response.php +++ b/app/Core/Http/Response.php @@ -231,6 +231,20 @@ class Response extends Base exit; } + /** + * Send a iCal response + * + * @access public + * @param string $data Raw data + * @param integer $status_code HTTP status code + */ + public function ical($data, $status_code = 200) + { + $this->status($status_code); + $this->contentType('text/calendar; charset=utf-8'); + echo $data; + } + /** * Send the security header: Content-Security-Policy * -- cgit v1.2.3