]> dev.renevier.net Git - syj.git/blobdiff - application/controllers/helpers/SyjApi.php
search a place with nominatim
[syj.git] / application / controllers / helpers / SyjApi.php
index 86ea00e3ff1cdc6fa6355843e81b5d164bddc496..21aa9dd9f9b3fe5e4c88a2eb37bdaa4d8240eb5d 100644 (file)
@@ -27,6 +27,12 @@ class Syj_Controller_Action_Helper_SyjApi extends Zend_Controller_Action_Helper_
         $this->_contentType = $contentType;
     }
 
+    public function setBodyJson($data) {
+        $this->setBody(json_encode($data))
+             ->setContentType('application/json');
+        return $this;
+    }
+
     public function setBody($body) {
         $this->_body = (string)$body;
         return $this;