Well, yeah, each controller, in this case, ''partners" and "social" extends from Zend_Rest_Controller.
On Wed, Jun 22, 2011 at 10:46 AM, Juan Felipe Alvarez Saldarriaga <[email protected]> wrote: > Nop, just change the default route to 'inject' a region. > > 2011/6/22 Sergey Romanov <[email protected]>: >> Do you extend your controller class from Zend_Rest_Controller? >> >> Sincerely >> Sergey Romanov >> >> Tel.: +996 (312) 68 91 34 >> Mob.: +996 (770) 537484 >> >> Skype: serhioromano >> >> -----Original Message----- >> From: Juan Felipe Alvarez Saldarriaga [mailto:[email protected]] >> Sent: Tuesday, June 21, 2011 8:07 PM >> To: [email protected] >> Subject: [fw-general] Zend_Rest_Route question >> >> Hey list!, >> >> Why if I don't bootstrap the router resource when I'm adding a rest route in >> the bootstrap file, request methods like post, put and delete doesn't work? >> this is actually my Bootstrap file: >> http://pastie.org/2101500 and the restful routes init method, >> http://pastie.org/2101474 >> >> <?php >> >> class Bootstrap extends Zend_Application_Bootstrap_Bootstrap { >> protected function _initRestfulRoutes() { >> $this->bootstrap( "frontcontroller" ); >> // $this->bootstrap( "frontcontroller" )->bootstrap( "router" ); >> $fc = Zend_Controller_Front::getInstance(); >> $restRoute = new Zend_Rest_Route( >> $fc, >> array(), >> array( "api" => array( "partners", "social" ) >> ) ); >> $fc->getRouter()->addRoute( "rest", $restRoute ); >> } >> } >> >> // If I don't 'bootstrap' the router resource my restful controllers doesn't >> work if I do a 'post', 'put' or 'delete' request. >> >> Also, when I go to http://mydomain.com the current route name is 'rest' >> instead of 'default'. I don't know if there's something wrong with my custom >> default route configuration: >> >> resources.router.routes.module.type = "Zend_Controller_Router_Route_Module" >> resources.router.routes.region.type = "Zend_Controller_Router_Route" >> resources.router.routes.region.route = ":region" >> resources.router.routes.region.reqs.region = "[a-z]{2}" >> resources.router.routes.region.abstract = 1 >> resources.router.routes.default.type = "Zend_Controller_Router_Route_Chain" >> resources.router.routes.default.chain = "region,module" >> >> Any help?. >> >> Thanks. >> >> -- >> Juan Felipe Alvarez Saldarriaga >> http://www.juan.im >> GTalk: [email protected] >> Skype: jfasaldarriaga >> >> -- >> List: [email protected] >> Info: http://framework.zend.com/archives >> Unsubscribe: [email protected] >> >> >> > > > > -- > Juan Felipe Alvarez Saldarriaga > http://www.juan.im > GTalk: [email protected] > Skype: jfasaldarriaga > -- Juan Felipe Alvarez Saldarriaga http://www.juan.im GTalk: [email protected] Skype: jfasaldarriaga -- List: [email protected] Info: http://framework.zend.com/archives Unsubscribe: [email protected]
