Url.php

Go to the documentation of this file.
00001 <?php
00002 
00032 class Robo47_Controller_Action_Helper_Url
00033 extends Zend_Controller_Action_Helper_Url
00034 {
00035 
00039     protected $_router = null;
00040 
00044     public function __construct(Zend_Controller_Router_Interface $router = null)
00045     {
00046         $this->setRouter($router);
00047     }
00048 
00055     public function setRouter(Zend_Controller_Router_Interface $router = null)
00056     {
00057         if (null === $router) {
00058             $router = Zend_Controller_Front::getInstance()->getRouter();
00059         }
00060         $this->_router = $router;
00061         return $this;
00062     }
00063 
00069     public function getRouter()
00070     {
00071         return $this->_router;
00072     }
00073 
00086     public function url($urlOptions = array(), $name = null, $reset = false,
00087         $encode = true)
00088     {
00089         return $this->_router->assemble($urlOptions, $name, $reset, $encode);
00090     }
00091 }