Is it possible to chain a Router_Route_Hostname to a Zend_Rest_Route? I'm
attempting to redirect http://api.mydomain.com to the "api" module using a
RESTful approach and I'm having no such luck. They work independently fine
but when I try to combine them everything blows up. Here's the code from my
bootstrap.

        public function _initRoute()
        {
                $front = Zend_Controller_Front::getInstance();
                $router = $front->getRouter();
                
                $apiRoute = new 
Zend_Controller_Router_Route_Hostname('api.test.dev',
array('module' => 'api'));
                $restRoute = new Zend_Rest_Route($front, array(), array('api'));
                

                $router->addRoute('api', $apiRoute->chain($restRoute));
        }

And the corresponding request paramaters for http://api.test.dev/events.json

array (
  'format' => 'json',
  'controller' => 'events',
  'action' => 'index',
  'module' => 'default',
)       

Any help would be greatly appreciated.

Thanks,

Kyle Spraggs ([email protected])
http://www.spiffyjr.me
-- 
View this message in context: 
http://old.nabble.com/Zend_Rest_Route-%2B-Chaining-tp26348056p26348056.html
Sent from the Zend Framework mailing list archive at Nabble.com.

Reply via email to