samsonasik wrote
> hm.., maybe like this ?
> 
>         $this->getResponse()->setStatusCode(404); 
>         $this->getResponse()->setContent(json_encode(array(
>             'status'  => $this->getResponse()->getStatusCode(),
>             'error'   =>'Not Found',
>             'message' => 'Page not found.' 
>         )));
>         $this->getResponse()->getHeaders()
>              ->addHeaderLine('content-type', 'application/json');
>         
>         return $this->getResponse();

hm... not very clean (I'd like use JsonModel) but if I don't found any other
way ^^



--
View this message in context: 
http://zend-framework-community.634137.n4.nabble.com/AbstractRestfulController-not-found-resource-best-way-tp4660975p4660980.html
Sent from the Zend Framework mailing list archive at Nabble.com.

-- 
List: [email protected]
Info: http://framework.zend.com/archives
Unsubscribe: [email protected]


Reply via email to