Created
March 8, 2010 11:58
-
-
Save davidreuss/325092 to your computer and use it in GitHub Desktop.
extension route attempt in zend framework - this fails as every parameter is checked for each route :(
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 | |
$def = new Zend_Controller_Router_Route( | |
':module/:controller/:action/*', | |
array( | |
'module' => 'public', | |
'controller' => 'index', | |
'action' => 'index' | |
) | |
); | |
$ext = new Zend_Controller_Router_Route( | |
':ext', | |
array( | |
'ext' => 'html' | |
) | |
); | |
$route = $def->chain($ext, '.'); | |
echo $route->assemble(array('ext' => 'json')); // public/index/index/ext/json.json | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment