diff --git a/README.md b/README.md index a1330a3312f35f63aef0f71c5cb73869db92041a..5e06fef28e2bc896103d3472188e20f916d8af6a 100644 --- a/README.md +++ b/README.md @@ -162,7 +162,7 @@ We recommend to clone out of your application and then symlink to it, for exampl Then you have to tell php to include the path to restful library. ``` set_include_path([your root path] . '/restful/library' . PATH_SEPARATOR . - get_include_path()); + get_include_path()); ``` ### Bootstrap as plugin @@ -173,11 +173,11 @@ $config = new Zend_Config(include //path to your config file); Restful_Model_Configuration::setConfig($config); ``` -Then you can bootstrap restful +Then you can bootstrap Restful ``` Restful_Bootstrap::asPlugin(Zend_Controller_Front::getInstance(), - 'rest', - Zend_Controller_Action_HelperBroker::getExistingHelper('ViewRenderer')); + 'rest', + Zend_Controller_Action_HelperBroker::getExistingHelper('ViewRenderer')); ``` **Front controller** is needed to add restful routes to its router. @@ -186,3 +186,13 @@ Restful_Bootstrap::asPlugin(Zend_Controller_Front::getInstance(), **ViewRenderer** is needed to add Restful view helpers path. +### Add Restful module + +In our bootstrap we tell Restful that we have a "rest" module to bind its route to. + +So we have to add a application/modules/rest/controllers/IndexController.php extending Restful_Controller: +``` +class Rest_IndexController extends Restful_Controller { +} +``` +From here urls like http://yourhost/pathtoyourapp/rest/Model_Name should work. \ No newline at end of file