Public Member Functions | Protected Attributes

Robo47_Controller_Action_Helper_Url Class Reference

List of all members.

Public Member Functions

 __construct (Zend_Controller_Router_Interface $router=null)
 getRouter ()
 Get Router.
 setRouter (Zend_Controller_Router_Interface $router=null)
 Set Router.
 url ($urlOptions=array(), $name=null, $reset=false, $encode=true)
 Assembles a URL based on a given route.

Protected Attributes

 $_router = null

Detailed Description

Definition at line 32 of file Url.php.


Constructor & Destructor Documentation

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

Definition at line 44 of file Url.php.

References setRouter().

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

Here is the call graph for this function:


Member Function Documentation

Robo47_Controller_Action_Helper_Url::getRouter (  ) 

Get Router.

Returns:
Zend_Controller_Router_Interface

Definition at line 69 of file Url.php.

    {
        return $this->_router;
    }

Robo47_Controller_Action_Helper_Url::setRouter ( Zend_Controller_Router_Interface $  router = null  ) 

Set Router.

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

Definition at line 55 of file Url.php.

Referenced by __construct().

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

Here is the caller graph for this function:

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

Assembles a URL based on a given route.

This method will typically be used for more complex operations, as it ties into the route objects registered with the router.

Parameters:
array $urlOptions
mixed $name
boolean $reset
boolean $encode
Returns:
string Url for the link href attribute.

Definition at line 86 of file Url.php.

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


Member Data Documentation

Robo47_Controller_Action_Helper_Url::$_router = null [protected]

Definition at line 39 of file Url.php.


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