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]