Public Member Functions | Protected Attributes

Robo47_View_Helper_Url Class Reference

List of all members.

Public Member Functions

 __construct (Zend_Controller_Router_Interface $router=null)
 getRouter ()
 Returns the used router.
 setRouter (Zend_Controller_Router_Interface $router=null)
 Set the used router.
 url (array $urlOptions=array(), $name=null, $reset=false, $encode=true)
 Generates an url given the name of a route.

Protected Attributes

 $_router = null

Detailed Description

Definition at line 31 of file Url.php.


Constructor & Destructor Documentation

Robo47_View_Helper_Url::__construct ( Zend_Controller_Router_Interface $  router = null  ) 
Parameters:
Zend_Controller_Router_Interface $router

Definition at line 45 of file Url.php.

References setRouter().

    {
        $this->setRouter($router);
    }

Here is the call graph for this function:


Member Function Documentation

Robo47_View_Helper_Url::getRouter (  ) 

Returns the used router.

Returns:
Zend_Controller_Router_Interface

Definition at line 71 of file Url.php.

    {
        return $this->_router;
    }

Robo47_View_Helper_Url::setRouter ( Zend_Controller_Router_Interface $  router = null  ) 

Set the used router.

Parameters:
Zend_Controller_Router_Interface $router
Returns:
Robo47_View_Helper_Url *Provides Fluent Interface*

Definition at line 56 of file Url.php.

Referenced by __construct().

    {
        if ($router === null) {
            $this->_router = Zend_Controller_Front::getInstance()->getRouter();
        } else {
            $this->_router = $router;
        }
        return $this;
    }

Here is the caller graph for this function:

Robo47_View_Helper_Url::url ( array $  urlOptions = array(),
name = null,
reset = false,
encode = true 
)

Generates an url given the name of a route.

Parameters:
array $urlOptions
mixed $name
bool $reset
Returns:
string

Definition at line 84 of file Url.php.

    {
        return $this->_router->assemble($urlOptions, $name, $reset, $encode);
    }


Member Data Documentation

Robo47_View_Helper_Url::$_router = null [protected]

Definition at line 39 of file Url.php.


The documentation for this class was generated from the following file: