Navigation/Page/Mvc.php

Show: PublicProtectedPrivateinherited
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-2014 Zend Technologies USA Inc. (http://www.zend.com)  
License
New BSD License  
Package
Zend_Navigation  
Subpackage
Page  
Version
$Id$  

\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
Container class for Zend_Navigation_Page classes.
Parent(s)
\Zend_Navigation_Page < \Zend_Navigation_Container
Category
Zend  
Copyright
Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com)  
License
New BSD License  

Properties

>VPropertyprotectedstring $_action
Action name to use when assembling URL
Details
Type
string
>VPropertyprotectedbool $_active = null
Whether this page should be considered active
Default valuenullDetails
Type
bool
>VPropertyprotectedstring $_controller
Controller name to use when assembling URL
Details
Type
string
>VPropertyprotectedbool $_encodeUrl = true
Whether href should be encoded when assembling URL
Default valuetrueDetails
Type
bool
See
 
>VPropertyprotectedstring $_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
>VPropertyprotectedstring $_module
Module name to use when assembling URL
Details
Type
string
>VPropertyprotectedarray $_params = array()
Params to use when assembling URL
Default valuearray()Details
Type
array
See
 
>VPropertyprotectedbool $_resetParams = true
Whether params should be reset when assembling URL
Default valuetrueDetails
Type
bool
See
 
>VPropertyprotectedstring $_route
Route name to use when assembling URL
Details
Type
string
See
 
>VPropertyprotectedstring $_scheme
Scheme to use when assembling URL
Details
Type
string
See
 
>VPropertyprotected\Zend_View_Helper_ServerUrl $_schemeHelper = null
static
View helper for assembling URLs with schemes
Default valuenullDetails
Type
\Zend_View_Helper_ServerUrl
See
 
>VPropertyprotected\Zend_Controller_Action_Helper_Url $_urlHelper = null
static
Action helper for assembling URLs
Default valuenullDetails
Type
\Zend_Controller_Action_Helper_Url
See
 

Methods

methodpublicaddParams(array $params) : \Zend_Navigation_Page_Mvc

Add multiple parameters (to use when assembling URL) at once

URL options passed to the url action helper for assembling URLs.
Parameters
NameTypeDescription
$paramsarray

paramters as array ('name' => 'value')

Returns
TypeDescription
\Zend_Navigation_Page_Mvcfluent interface, returns self
Details
See
 
methodpublicclearParams() : \Zend_Navigation_Page_Mvc

Clear all parameters (to use when assembling URL)

Returns
TypeDescription
\Zend_Navigation_Page_Mvcfluent interface, returns self
Details
See
 
methodpublicgetAction() : string | null

Returns action name to use when assembling URL

Returns
TypeDescription
string | nullaction name
Details
See
 
methodpublicgetController() : string | null

Returns controller name to use when assembling URL

Returns
TypeDescription
string | nullcontroller name or null
Details
See
 
methodpublicgetEncodeUrl() : bool

Returns whether herf should be encoded when assembling URL

Returns
TypeDescription
boolwhether herf should be encoded when assembling URL
Details
See
 
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
TypeDescription
stringpage href
methodpublicgetModule() : string | null

Returns module name to use when assembling URL

Returns
TypeDescription
string | nullmodule name or null
Details
See
 
methodpublicgetParam(string $name) : mixed

Retrieve a single parameter (to use when assembling URL)

Parameters
NameTypeDescription
$namestring

parameter name

Returns
TypeDescription
mixed
Details
See
 
methodpublicgetParams() : array

Retrieve all parameters (to use when assembling URL)

Returns
TypeDescription
arrayparameters as array ('name' => 'value')
Details
See
 
methodpublicgetResetParams() : bool

Returns whether params should be reset when assembling URL

Returns
TypeDescription
boolwhether params should be reset when assembling URL
Details
See
 
methodpublicgetRoute() : string

Returns route name to use when assembling URL

Returns
TypeDescription
stringroute name
Details
See
 
methodpublicgetScheme() : string | null

Returns scheme to use when assembling URL

Returns
TypeDescription
string | nullscheme or null
Details
See
 
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
NameTypeDescription
$recursivebool

[optional] whether page should be considered

                     active if any child pages are active. Default is
                     false.
Returns
TypeDescription
boolwhether page should be considered active or not
methodpublicremoveParam(string $name) : bool

Remove parameter (to use when assembling URL)

Parameters
NameTypeDescription
$namestring
Returns
TypeDescription
bool
Details
See
 
methodpublicsetAction(string $action) : \Zend_Navigation_Page_Mvc

Sets action name to use when assembling URL

Parameters
NameTypeDescription
$actionstring

action name

Returns
TypeDescription
\Zend_Navigation_Page_Mvcfluent interface, returns self
Throws
ExceptionDescription
\Zend_Navigation_Exceptionif invalid $action is given
Details
See
 
methodpublicsetController(string | null $controller) : \Zend_Navigation_Page_Mvc

Sets controller name to use when assembling URL

Parameters
NameTypeDescription
$controllerstring | null

controller name

Returns
TypeDescription
\Zend_Navigation_Page_Mvcfluent interface, returns self
Throws
ExceptionDescription
\Zend_Navigation_Exceptionif invalid controller name is given
Details
See
 
methodpublicsetEncodeUrl( $encodeUrl) : \Zend_Navigation_Page_Mvc

Sets whether href should be encoded when assembling URL

Parameters
NameTypeDescription
$encodeUrl
Returns
TypeDescription
\Zend_Navigation_Page_Mvcfluent interface, returns self
Details
See
 
methodpublicsetModule(string | null $module) : \Zend_Navigation_Page_Mvc

Sets module name to use when assembling URL

Parameters
NameTypeDescription
$modulestring | null

module name

Returns
TypeDescription
\Zend_Navigation_Page_Mvcfluent interface, returns self
Throws
ExceptionDescription
\Zend_Navigation_Exceptionif invalid module name is given
Details
See
 
methodpublicsetParam(string $name, mixed $value) : \Zend_Navigation_Page_Mvc

Set parameter (to use when assembling URL)

URL option passed to the url action helper for assembling URLs.
Parameters
NameTypeDescription
$namestring

parameter name

$valuemixed

parameter value

Returns
TypeDescription
\Zend_Navigation_Page_Mvcfluent interface, returns self
Details
See
 
methodpublicsetParams(array | null $params = null) : \Zend_Navigation_Page_Mvc

Set multiple parameters (to use when assembling URL) at once

URL options passed to the url action helper for assembling URLs. Overwrites any previously set parameters!
Parameters
NameTypeDescription
$paramsarray | null

[optional] paramters as array

                                 ('name' => 'value'). Default is null
                                 which clears all params.
Returns
TypeDescription
\Zend_Navigation_Page_Mvcfluent interface, returns self
Details
See
 
methodpublicsetResetParams(bool $resetParams) : \Zend_Navigation_Page_Mvc

Sets whether params should be reset when assembling URL

Parameters
NameTypeDescription
$resetParamsbool

whether params should be reset when assembling URL

Returns
TypeDescription
\Zend_Navigation_Page_Mvcfluent interface, returns self
Details
See
 
methodpublicsetRoute(string $route) : \Zend_Navigation_Page_Mvc

Sets route name to use when assembling URL

Parameters
NameTypeDescription
$routestring

route name to use when assembling URL

Returns
TypeDescription
\Zend_Navigation_Page_Mvcfluent interface, returns self
Throws
ExceptionDescription
\Zend_Navigation_Exceptionif invalid $route is given
Details
See
 
methodpublicsetScheme(string | null $scheme) : \Zend_Navigation_Page_Mvc

Sets scheme to use when assembling URL

Parameters
NameTypeDescription
$schemestring | null

scheme

Returns
TypeDescription
\Zend_Navigation_Page_Mvcfluent interface, returns self
Throws
ExceptionDescription
\Zend_Navigation_Exception
Details
See
 
methodpublicsetSchemeHelper(\Zend_View_Helper_ServerUrl $sh) : void
static

Sets view helper for assembling URLs with schemes

Parameters
NameTypeDescription
$sh\Zend_View_Helper_ServerUrl

scheme helper

Details
See
 
methodpublicsetUrlHelper(\Zend_Controller_Action_Helper_Url $uh) : void
static

Sets action helper for assembling URLs

Parameters
NameTypeDescription
$uh\Zend_Controller_Action_Helper_Url

URL helper

Details
See
 
methodpublictoArray() : array

Returns an array representation of the page

Returns
TypeDescription
arrayassociative array containing all page properties
Documentation was generated by phpDocumentor 2.2.0 .