I'm trying to get ZF up and running and want to test out it's Rest server
functionality. I am using the Zend_Controller_Front and am having problems
integrating within a Controller. Here's some sample code:
class LocationController extends Zend_Controller_Action{
function sayHelloAction(){
return "Hello there";
}
public function restAction(){
Zend_Loader::loadClass('Zend_Rest_Server');
$server = new Zend_Rest_Server();
$server->addFunction('sayHello');
$server->handle();
}
}
I'm able to print_r the $server after I create it but addFunction causes
things to go awry with no exception thrown. Obviously, I'm doing this wrong
but the docs are less than helpful on this.
thanks,
jon
--
View this message in context:
http://www.nabble.com/question-about-using-Zend_Rest_Server-within-a-controller-tf3891822s16154.html#a11032955
Sent from the Zend Framework mailing list archive at Nabble.com.