Zend Framework
LICENSE
This source file is subject to the new BSD license that is bundled with this package in the file LICENSE.txt. It is also available through the world-wide-web at this URL: http://framework.zend.com/license/new-bsd If you did not receive a copy of the license and are unable to obtain it through the world-wide-web, please send an email to license@zend.com so we can send you a copy immediately.
Represents a page that is defined using module, controller, action, route name and route params to assemble the href

bool
$_encodeUrl= 'true'
Whether href should be encoded when assembling URL
true
Details
string
$_hrefCache= ''
Cached href
The use of this variable minimizes execution time when getHref() is called more than once during the lifetime of a request. If a property is updated, the cache is invalidated.

array
$_params= 'array()'
Params to use when assembling URL
array()
Details
bool
$_resetParams= 'true'
Whether params should be reset when assembling URL
true
Details
getAction(
)
:
string|null
Returns action name to use when assembling URL
Type | Description |
---|---|
string|null | action name |

getController(
)
:
string|null
Returns controller name to use when assembling URL
Type | Description |
---|---|
string|null | controller name or null |

getEncodeUrl(
)
:
bool
Returns whether herf should be encoded when assembling URL
Type | Description |
---|---|
bool | whether herf should be encoded when assembling URL |

getHref(
)
:
string
Returns href for this page
This method uses {@link Zend_Controller_Action_Helper_Url} to assemble the href based on the page's properties.
Type | Description |
---|---|
string | page href |

getModule(
)
:
string|null
Returns module name to use when assembling URL
Type | Description |
---|---|
string|null | module name or null |

getParams(
)
:
array
Returns params to use when assembling URL
Type | Description |
---|---|
array | page params |

getResetParams(
)
:
bool
Returns whether params should be reset when assembling URL
Type | Description |
---|---|
bool | whether params should be reset when assembling URL |

getRoute(
)
:
string
Returns route name to use when assembling URL
Type | Description |
---|---|
string | route name |

isActive(
bool $recursive
=
false
)
:
bool
Returns whether page should be considered active or not
This method will compare the page properties against the request object that is found in the front controller.
Name | Type | Description |
---|---|---|
$recursive | bool | [optional] whether page should be considered active if any child pages are active. Default is false. |
Type | Description |
---|---|
bool | whether page should be considered active or not |

setAction(
string $action
)
:
\Zend_Navigation_Page_Mvc
Sets action name to use when assembling URL
Name | Type | Description |
---|---|---|
$action | string | action name |
Type | Description |
---|---|
\Zend_Navigation_Page_Mvc | fluent interface, returns self |
Exception | Description |
---|---|
\Zend_Navigation_Exception | if invalid $action is given |

setController(
string|null $controller
)
:
\Zend_Navigation_Page_Mvc
Sets controller name to use when assembling URL
Name | Type | Description |
---|---|---|
$controller | string|null | controller name |
Type | Description |
---|---|
\Zend_Navigation_Page_Mvc | fluent interface, returns self |
Exception | Description |
---|---|
\Zend_Navigation_Exception | if invalid controller name is given |

setEncodeUrl(
$encodeUrl
)
:
\Zend_Navigation_Page_Mvc
Sets whether href should be encoded when assembling URL
Name | Type | Description |
---|---|---|
$encodeUrl |
Type | Description |
---|---|
\Zend_Navigation_Page_Mvc | fluent interface, returns self |

setModule(
string|null $module
)
:
\Zend_Navigation_Page_Mvc
Sets module name to use when assembling URL
Name | Type | Description |
---|---|---|
$module | string|null | module name |
Type | Description |
---|---|
\Zend_Navigation_Page_Mvc | fluent interface, returns self |
Exception | Description |
---|---|
\Zend_Navigation_Exception | if invalid module name is given |

setParams(
array|null $params
=
null
)
:
\Zend_Navigation_Page_Mvc
Sets params to use when assembling URL
Name | Type | Description |
---|---|---|
$params | array|null | [optional] page params. Default is null which sets no params. |
Type | Description |
---|---|
\Zend_Navigation_Page_Mvc | fluent interface, returns self |

setResetParams(
bool $resetParams
)
:
\Zend_Navigation_Page_Mvc
Sets whether params should be reset when assembling URL
Name | Type | Description |
---|---|---|
$resetParams | bool | whether params should be reset when assembling URL |
Type | Description |
---|---|
\Zend_Navigation_Page_Mvc | fluent interface, returns self |

setRoute(
string $route
)
:
\Zend_Navigation_Page_Mvc
Sets route name to use when assembling URL
Name | Type | Description |
---|---|---|
$route | string | route name to use when assembling URL |
Type | Description |
---|---|
\Zend_Navigation_Page_Mvc | fluent interface, returns self |
Exception | Description |
---|---|
\Zend_Navigation_Exception | if invalid $route is given |

setUrlHelper(
\Zend_Controller_Action_Helper_Url $uh
)
:
void
Sets action helper for assembling URLs
Name | Type | Description |
---|---|---|
$uh | \Zend_Controller_Action_Helper_Url | URL helper |