Skip to content

Instantly share code, notes, and snippets.

@davidreuss
Created March 8, 2010 11:58
Show Gist options
  • Save davidreuss/325092 to your computer and use it in GitHub Desktop.
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 :(
<?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