Created
July 11, 2012 19:46
-
-
Save alganet/3092803 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
//Sketch 1 | |
$r3->any(array( | |
'/users' => 'MyApp\Controllers\UsersCollection', | |
'/users/*' => 'MyApp\Controllers\UsersResource', | |
'/users/*/lists' => 'MyApp\Controllers\UsersCollection\ListsCollection', | |
'/users/*/lists/*' => 'MyApp\Controllers\UsersCollection\ListsResource', | |
'/posts/*/*/*' => 'MyApp\Controllers\PostsResource' | |
))->by($processors)->when($conditions)->through($formatters)->accept($conneg); | |
//Sketch 2 (alternative to 1) | |
$r3->namespaceRoute('MyApp\Controllers'); //based on conventions shown on Sketch 1 | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Also translates to:
Which the pandas can already do without any help from us.
concerns:
because remember we still know there is an any catch all /** that we have to call for all and it can also spawn anything defined in $routes, what do we know more about that?