The largest Interview Solution Library on the web


« Previous | 1 | 2 | 3 | Next »

Saas - Zend_Rest_Server: example


  • We now create a controller class to handle incoming requests. The controller class features an action which instantiates the Zend_Rest_Server class
class RestController extends Zend_Controller_Action
{
protected $_server;
public function init()
{
$this->_server = new Zend_Rest_Server();
$this->_helper->viewRenderer->setNoRender();
}
public function indexAction()
{
require_once ‘Greetings.php';
$this->_server->setClass(‘Greetings');
$this->_server->handle();
}
}
« Previous | 1 | 2 | 3 | Next »


copyright © 2014 - all rights riserved by javatechnologycenter.com