Skip to content
Snippets Groups Projects
Commit 2d90f131 authored by Patrick Barroca's avatar Patrick Barroca :grin:
Browse files

Documentation

parent 5cc8ff6f
Branches
No related merge requests found
......@@ -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
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment