Organizational Research By

Surprising Reserch Topic

Zend_Rest_Route not working for a sub-directory controller

I'm trying to define RESTful routes for sub directory controllers. I want to be able to create routes for the url at admin/questions/*. My controller is Admin_QuestionsController:

- application
  - controllers
      QuestionsController.php (class Admin_QuestionsController)

Below is how I'm declaring my RESTful route for this controller:

$restRoute = new Zend_Rest_Route($front, array(), array(
    'admin' => array('questions')
$router->addRoute('rest', $restRoute);

..from the documentation I can't see what I'm doing wrong - However, I get the following error:

Invalid controller specified (admin) 

I can get the routes to work when I declare then not as Rest routes:

    new Zend_Controller_Router_Route( '/admin/questions', array(
        'controller' => 'Admin_Questions', 
        'action' => 'index')
); I don't think I've have the folder structure wrong, or the class name. But, I need RESTful routes which I'm unable to achieve.

asked May 16, 2015 in Zend by rajesh
0 votes

Related Hot Questions

1 Answer

0 votes
answered May 16, 2015 by rajesh