]> git.andy128k.dev Git - ipf.git/commitdiff
Json response
authoravl <alex.litovchenko@gmail.com>
Sun, 31 Aug 2008 13:23:34 +0000 (16:23 +0300)
committeravl <alex.litovchenko@gmail.com>
Sun, 31 Aug 2008 13:23:34 +0000 (16:23 +0300)
ipf/http/response/json.php [new file with mode: 0644]

diff --git a/ipf/http/response/json.php b/ipf/http/response/json.php
new file mode 100644 (file)
index 0000000..c305cee
--- /dev/null
@@ -0,0 +1,7 @@
+<?php
+
+class IPF_HTTP_Response_Json extends IPF_HTTP_Response{
+    function __construct($content){
+        parent::__construct(json_encode($content),'application/json');
+    }
+}