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

Documentation

parent 78db9b3d
No related merge requests found
......@@ -151,3 +151,38 @@ http://localhost/Restful/Class_Batch/3
```
### Create, Update, Delete are not implemented yet
## As a module plugin in existing Storm/ZendFramework application
Restful storm can be integrated in an existing MVC ZendFramework application.
### Add restful source
We recommend to clone out of your application and then symlink to it, for example in a "restful/" directory.
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());
```
### Bootstrap as plugin
When your application bootstrap you need to pass the models configuration to Restful_Model_Configuration:
```
$config = new Zend_Config(include //path to your config file);
Restful_Model_Configuration::setConfig($config);
```
Then you can bootstrap restful
```
Restful_Bootstrap::asPlugin(Zend_Controller_Front::getInstance(),
'rest',
Zend_Controller_Action_HelperBroker::getExistingHelper('ViewRenderer'));
```
**Front controller** is needed to add restful routes to its router.
**'rest'** is the name of the module used to bind Restful_Controller in your application.
**ViewRenderer** is needed to add Restful view helpers path.
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