All pastes #766485 Raw Edit

Miscellany

public php v1 · immutable
·published 2007-11-08 22:14 UTC
rendered paste body
$fc = Zend_Controller_Front::getInstance();$routeur = $fc->getRouter();$routeur->removeDefaultRoutes();$p = '([[:alpha:]]+)';$vars = array('controller'	=> array($p, 'index'),	      'action'		=> array($p, 'index'),	      'format'		=> array($p, 'xhtml'),	      '#'		=> array('(.*)', ''));$pattern = '[index[/%controller%[/%action%]][.%format%][/%#%]]';$route = new Knema_Controller_Router_Route_Uri($vars,					       $pattern);$routeur->addRoute('default', $route);