API Documentation

Zend/Navigation/Page/Mvc.php

Show: inherited
Table of Contents

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.

Category
Zend  
Copyright
Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)  
License
New BSD License  
Package
Zend_Navigation  
Subpackage
Page  
Version
$Id: Mvc.php 24594 2012-01-05 21:27:01Z matthew $  

\Zend_Navigation_Page_Mvc

Package: Zend\Navigation\Page

Represents a page that is defined using module, controller, action, route name and route params to assemble the href

Parent(s)
\Zend_Navigation_Page < \Zend_Navigation_Container
Category
Zend  
Copyright
Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)  
License
New BSD License  

Properties

Propertyprotectedstring  $_action= ''

Action name to use when assembling URL

Details
Type
string
Propertyprotectedstring  $_controller= ''

Controller name to use when assembling URL

Details
Type
string
Propertyprotectedbool  $_encodeUrl= 'true'

Whether href should be encoded when assembling URL

Default valuetrueDetails
Type
bool
See
\getHref()  
Propertyprotectedstring  $_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.

Details
Type
string
Propertyprotectedstring  $_module= ''

Module name to use when assembling URL

Details
Type
string
Propertyprotectedarray  $_params= 'array()'

Params to use when assembling URL

Default valuearray()Details
Type
array
See
\getHref()  
Propertyprotectedbool  $_resetParams= 'true'

Whether params should be reset when assembling URL

Default valuetrueDetails
Type
bool
See
\getHref()  
Propertyprotectedstring  $_route= ''

Route name to use when assembling URL

Details
Type
string
See
\getHref()  
Propertyprotected\Zend_Controller_Action_Helper_Url  $_urlHelper= 'null'
static

Action helper for assembling URLs

Default valuenullDetails
Type
\Zend_Controller_Action_Helper_Url
See
\getHref()  

Methods

methodpublicgetAction( ) : string|null

Returns action name to use when assembling URL

Returns
Type Description
string|null action name
Details
See
\getHref()  
methodpublicgetController( ) : string|null

Returns controller name to use when assembling URL

Returns
Type Description
string|null controller name or null
Details
See
\getHref()  
methodpublicgetEncodeUrl( ) : bool

Returns whether herf should be encoded when assembling URL

Returns
Type Description
bool whether herf should be encoded when assembling URL
Details
See
\getHref()  
methodpublicgetHref( ) : 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.

Returns
Type Description
string page href
methodpublicgetModule( ) : string|null

Returns module name to use when assembling URL

Returns
Type Description
string|null module name or null
Details
See
\getHref()  
methodpublicgetParams( ) : array

Returns params to use when assembling URL

Returns
Type Description
array page params
Details
See
\getHref()  
methodpublicgetResetParams( ) : bool

Returns whether params should be reset when assembling URL

Returns
Type Description
bool whether params should be reset when assembling URL
Details
See
\getHref()  
methodpublicgetRoute( ) : string

Returns route name to use when assembling URL

Returns
Type Description
string route name
Details
See
\getHref()  
methodpublicisActive( 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.

Parameters
Name Type Description
$recursive bool

[optional] whether page should be considered active if any child pages are active. Default is false.

Returns
Type Description
bool whether page should be considered active or not
methodpublicsetAction( string $action ) : \Zend_Navigation_Page_Mvc

Sets action name to use when assembling URL

Parameters
Name Type Description
$action string

action name

Returns
Type Description
\Zend_Navigation_Page_Mvc fluent interface, returns self
Throws
Exception Description
\Zend_Navigation_Exception if invalid $action is given
Details
See
\getHref()  
methodpublicsetController( string|null $controller ) : \Zend_Navigation_Page_Mvc

Sets controller name to use when assembling URL

Parameters
Name Type Description
$controller string|null

controller name

Returns
Type Description
\Zend_Navigation_Page_Mvc fluent interface, returns self
Throws
Exception Description
\Zend_Navigation_Exception if invalid controller name is given
Details
See
\getHref()  
methodpublicsetEncodeUrl(  $encodeUrl ) : \Zend_Navigation_Page_Mvc

Sets whether href should be encoded when assembling URL

Parameters
Name Type Description
$encodeUrl
Returns
Type Description
\Zend_Navigation_Page_Mvc fluent interface, returns self
Details
See
\getHref()  
methodpublicsetModule( string|null $module ) : \Zend_Navigation_Page_Mvc

Sets module name to use when assembling URL

Parameters
Name Type Description
$module string|null

module name

Returns
Type Description
\Zend_Navigation_Page_Mvc fluent interface, returns self
Throws
Exception Description
\Zend_Navigation_Exception if invalid module name is given
Details
See
\getHref()  
methodpublicsetParams( array|null $params = null ) : \Zend_Navigation_Page_Mvc

Sets params to use when assembling URL

Parameters
Name Type Description
$params array|null

[optional] page params. Default is null which sets no params.

Returns
Type Description
\Zend_Navigation_Page_Mvc fluent interface, returns self
Details
See
\getHref()  
methodpublicsetResetParams( bool $resetParams ) : \Zend_Navigation_Page_Mvc

Sets whether params should be reset when assembling URL

Parameters
Name Type Description
$resetParams bool

whether params should be reset when assembling URL

Returns
Type Description
\Zend_Navigation_Page_Mvc fluent interface, returns self
Details
See
\getHref()  
methodpublicsetRoute( string $route ) : \Zend_Navigation_Page_Mvc

Sets route name to use when assembling URL

Parameters
Name Type Description
$route string

route name to use when assembling URL

Returns
Type Description
\Zend_Navigation_Page_Mvc fluent interface, returns self
Throws
Exception Description
\Zend_Navigation_Exception if invalid $route is given
Details
See
\getHref()  
methodpublicsetUrlHelper( \Zend_Controller_Action_Helper_Url $uh ) : void
static

Sets action helper for assembling URLs

Parameters
Name Type Description
$uh \Zend_Controller_Action_Helper_Url

URL helper

Details
See
\getHref()  
methodpublictoArray( ) : array

Returns an array representation of the page

Returns
Type Description
array associative array containing all page properties
Documentation was generated by DocBlox 0.15.1.