Skip to content

Commit

Permalink
gitignore
Browse files Browse the repository at this point in the history
  • Loading branch information
c9s committed Feb 25, 2012
1 parent 03c7271 commit 17086e5
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 7 deletions.
2 changes: 2 additions & 0 deletions .gitignore
@@ -0,0 +1,2 @@
.onion
vendor
19 changes: 12 additions & 7 deletions README.md
Expand Up @@ -48,8 +48,8 @@ To add a new route with requirement:

Meta Attributes
---------------
meta attributes is started with ':' character. currently, Roller supports:
`:method`, `:default`, `:requirement`, `:post`, `:get` attributes.
meta attributes is started without ':' prefix. currently, Roller supports:
`method`, `default`, `requirement`, `post`, `get` attributes.

To add a new route with requirement and default value:

Expand All @@ -74,6 +74,7 @@ To add a new route with request method (like POST method):

Dispatch
--------

To dispatch path:

$r = $router->dispatch( $_SERVER['PATH_INFO'] );
Expand All @@ -85,7 +86,6 @@ To evalulate response content:
else
die('page not found.');


Mount paths
-----------

Expand Down Expand Up @@ -118,10 +118,15 @@ To enable file cache:

RESTful plugin:


$restfulPlugin = new Roller\Plugin\RESTful( );
$restfulPlugin->handler( );

$restful = new Roller\Plugin\RESTful( array(
'prefix' => '/restful',
));
$restful->mount = function() {
$method = $_SERVER['REQUEST_METHOD'];
$routes = new RouteSet;
$routes->add( '/:resource_id/:id' );
};
$router->addPlugin( $restful );

Hacking
-------
Expand Down

0 comments on commit 17086e5

Please sign in to comment.