Created
April 1, 2014 12:45
-
-
Save RafaelKa/9913227 to your computer and use it in GitHub Desktop.
econics subfolders for actioncontroller
This file contains hidden or 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
## | |
# subfolder, controller and action with optional format | |
- | |
name: 'subfolder, controller and action with optional format' | |
uriPattern: '{@cf}/{@cn}/{@action}(.{@format})' | |
defaults: | |
'@package': 'Foo.Bar' | |
'@controller': '{@cf}\{@cn}' | |
'@format': 'html' | |
This file contains hidden or 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
## | |
# subfolder, controller and action with optional format | |
- | |
name: 'subfolder, controller and action with optional format' | |
uriPattern: '{@controller}/{@action}(.{@format})' | |
defaults: | |
'@package': 'Foo.Bar' | |
'@controller': 'YourStandardSubFolder\Standard' | |
'@format': 'html' | |
routeParts: | |
'@controller': | |
handler: 'Econic\Package\Mvc\Routing\SubFolderPartHandler' | |
This file contains hidden or 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 | |
//... | |
/** | |
* ... | |
*/ | |
protected function findValueToMatch($routePath) { | |
$valueToMatch = $routePath; // is whole uri | |
// find string before and after slash f.x. "subfolder/controller" | |
return "subfolder/controller"; | |
} | |
//... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment