I've been using Zend_Controller_Action_Helper_Redirector class in several of my projects along with the gotoSimple function to handle my redirects which is really nice. I can create my custom routes and not have to worry about searching through files updating paths and so on. It got me thinking that it might be helpful to have the same functionality within Zend_View, allowing me to assemble links based on pre-existing routes. I took a look at the existing gotoSimple function and found it fairly easy to create a simple view helper to that does exactly that with a few minor modifications. Don't know if anyone else will find this helpful, but sharing is caring and so on.

PHP Code:
class Default_View_Helper_LinkSimple extends Zend_View_Helper_Abstract
{
    public function 
linkSimple($action$controller null$module null, array $params = array())
    {
        
$redirector = new Zend_Controller_Action_Helper_Redirector();
        
$dispatcher $redirector->getFrontController()->getDispatcher();
        
$request    $redirector->getRequest();
        
$curModule  $request->getModuleName();
        
$useDefaultController false;

        if (
null === $controller && null !== $module) {
            
$useDefaultController true;
        }

        if (
null === $module) {
            
$module $curModule;
        }

        if (
$module == $dispatcher->getDefaultModule()) {
            
$module '';
        }

        if (
null === $controller && !$useDefaultController) {
            
$controller $request->getControllerName();
            if (empty(
$controller)) {
                
$controller $dispatcher->getDefaultControllerName();
            }
        }

        
$params['module']     = $module;
        
$params['controller'] = $controller;
        
$params['action']     = $action;

        
$router $redirector->getFrontController()->getRouter();
        
$url    $router->assemble($params'default'true);

        return 
$url;
    }

So instead of writing out each and every link a simple

PHP Code:
<?php echo $this->linkSimple('update','user','admin',array('id'=> $id)) ?>
And the path to my admin/user/update/1 is created. Slightly nifty... But then again its 4:00am >.>