Navigation/Page/Mvc.php
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 [email protected] 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 25213 2013-01-11 08:19:09Z frosch $
\Zend_Navigation_Page_Mvc
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-2012 Zend Technologies USA Inc. (http://www.zend.com)
- License
- New BSD License
Properties

string|null $_accesskey =
This attribute assigns an access key to an element. An access key is a single character from the document character set.
- Type
- string | null
- Inherited_from
- \Zend_Navigation_Page::$$_accesskey
- Link
- http://www.w3.org/TR/html401/interact/forms.html#access-keys

bool $_active = nullWhether this page should be considered active
nullDetails- Type
- bool

array $_customHtmlAttribs = array()
array()Details- Type
- array
- Inherited_from
- \Zend_Navigation_Page::$$_customHtmlAttribs

string $_defaultPageType = The type of page to use when it wasn't set
Inherited from: \Zend_Navigation_Page::$$_defaultPageType- Type
- string
- Inherited_from
- \Zend_Navigation_Page::$$_defaultPageType

bool $_dirtyIndex = falseWhether index is dirty and needs to be re-arranged
Inherited from: \Zend_Navigation_Container::$$_dirtyIndex\Zend_Navigation_Page::$$_dirtyIndexfalseDetails- Type
- bool
- Inherited_from
- \Zend_Navigation_Container::$$_dirtyIndex
- Inherited_from
- \Zend_Navigation_Page::$$_dirtyIndex

bool $_encodeUrl = trueWhether href should be encoded when assembling URL
trueDetails- Type
- bool
- See
- \global\getHref()

string|null $_fragment =
The fragment identifier (anchor identifier) pointing to an anchor within a resource that is subordinate to another, primary resource. The fragment identifier introduced by a hash mark "#". Example: http://www.example.org/foo.html#bar ("bar" is the fragment identifier)
- Type
- string | null
- Inherited_from
- \Zend_Navigation_Page::$$_fragment
- Link
- http://www.w3.org/TR/html401/intro/intro.html#fragment-uri

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.
- Type
- string

array $_index = array()An index that contains the order in which to iterate pages
Inherited from: \Zend_Navigation_Container::$$_index\Zend_Navigation_Page::$$_indexarray()Details- Type
- array
- Inherited_from
- \Zend_Navigation_Container::$$_index
- Inherited_from
- \Zend_Navigation_Page::$$_index

array $_pages = array()Contains sub pages
Inherited from: \Zend_Navigation_Container::$$_pages\Zend_Navigation_Page::$$_pagesarray()Details- Type
- array
- Inherited_from
- \Zend_Navigation_Container::$$_pages
- Inherited_from
- \Zend_Navigation_Page::$$_pages

array $_params = array()Params to use when assembling URL
array()Details- Type
- array
- See
- \global\getHref()

\Zend_Navigation_Container|null $_parent =
- Type
- \Zend_Navigation_Container | null
- Inherited_from
- \Zend_Navigation_Page::$$_parent

string|null $_privilege =
- Type
- string | null
- Inherited_from
- \Zend_Navigation_Page::$$_privilege

array $_properties = array()Custom page properties, used by __set(), __get() and __isset()
Inherited from: \Zend_Navigation_Page::$$_propertiesarray()Details- Type
- array
- Inherited_from
- \Zend_Navigation_Page::$$_properties

array $_rel = array()
array()Details- Type
- array
- Inherited_from
- \Zend_Navigation_Page::$$_rel
- Link
- http://www.w3.org/TR/html4/struct/links.html#h-12.3.1

bool $_resetParams = trueWhether params should be reset when assembling URL
trueDetails- Type
- bool
- See
- \global\getHref()

string|\Zend_Acl_Resource_Interface|null $_resource =
- Type
- string | \Zend_Acl_Resource_Interface | null
- Inherited_from
- \Zend_Navigation_Page::$$_resource

array $_rev = array()
array()Details- Type
- array
- Inherited_from
- \Zend_Navigation_Page::$$_rev
- Link
- http://www.w3.org/TR/html4/struct/links.html#h-12.3.1

\Zend_View_Helper_ServerUrl $_schemeHelper = nullView helper for assembling URLs with schemes
nullDetails- Type
- \Zend_View_Helper_ServerUrl
- See
- \global\getHref()

\Zend_Controller_Action_Helper_Url $_urlHelper = nullAction helper for assembling URLs
nullDetails- Type
- \Zend_Controller_Action_Helper_Url
- See
- \global\getHref()

bool $_visible = trueWhether this page should be considered visible
Inherited from: \Zend_Navigation_Page::$$_visibletrueDetails- Type
- bool
- Inherited_from
- \Zend_Navigation_Page::$$_visible
Methods

__call(string $method, array $arguments) : mixedMagic overload: Proxy calls to finder methods
Inherited from: \Zend_Navigation_Container::__call()\Zend_Navigation_Page::__call()Examples of finder calls:
// METHOD // SAME AS
$nav->findByLabel('foo'); // $nav->findOneBy('label', 'foo');
$nav->findByLabel('/foo/', true); // $nav->findBy('label', '/foo/', true);
$nav->findOneByLabel('foo'); // $nav->findOneBy('label', 'foo');
$nav->findAllByClass('foo'); // $nav->findAllBy('class', 'foo');
| Name | Type | Description |
|---|---|---|
| $method | string | method name |
| $arguments | array | method arguments |
| Type | Description |
|---|---|
| mixed | Zend_Navigation|array|null matching page, array of pages or null |
| Exception | Description |
|---|---|
| \Zend_Navigation_Exception | if method does not exist |

__construct(array | \Zend_Config $options = null) : void
| Name | Type | Description |
|---|---|---|
| $options | array | \Zend_Config | [optional] page options. Default is null, which should set defaults. |
| Exception | Description |
|---|---|
| \Zend_Navigation_Exception | if invalid options are given |

__get(string $name) : mixedReturns a property, or null if it doesn't exist
Inherited from: \Zend_Navigation_Page::__get()Magic overload for enabling
$page->propname
.
| Name | Type | Description |
|---|---|---|
| $name | string | property name |
| Type | Description |
|---|---|
| mixed | property value or null |
| Exception | Description |
|---|---|
| \Zend_Navigation_Exception | if property name is invalid |

__isset(string $name) : bool
Magic overload for enabling
isset($page->propname)
.
Returns true if the property is native (id, class, title, etc), and true or false if it's a custom property (depending on whether the property actually is set).
| Name | Type | Description |
|---|---|---|
| $name | string | property name |
| Type | Description |
|---|---|
| bool | whether the given property exists |

__set(string $name, mixed $value) : void
Magic overload for enabling
$page->propname = $value
.
| Name | Type | Description |
|---|---|---|
| $name | string | property name |
| $value | mixed | value to set |
| Exception | Description |
|---|---|
| \Zend_Navigation_Exception | if property name is invalid |

__toString() : string
Magic overload for enabling
echo $page
.
| Type | Description |
|---|---|
| string | page label |

__unset(string $name) : void
Magic overload for enabling
unset($page->propname)
.
| Name | Type | Description |
|---|---|---|
| $name | string | property name |
| Exception | Description |
|---|---|
| \Zend_Navigation_Exception | if the property is native |

_normalizePropertyName(string $property) : stringNormalizes a property name
Inherited from: \Zend_Navigation_Page::_normalizePropertyName()| Name | Type | Description |
|---|---|---|
| $property | string | property name to normalize |
| Type | Description |
|---|---|
| string | normalized property name |

_sort() : voidSorts the page index according to page order
Inherited from: \Zend_Navigation_Container::_sort()\Zend_Navigation_Page::_sort()
addPage(\Zend_Navigation_Page | array | \Zend_Config $page) : \Zend_Navigation_ContainerAdds a page to the container
Inherited from: \Zend_Navigation_Container::addPage()\Zend_Navigation_Page::addPage()This method will inject the container as the given page's parent by calling Zend_Navigation_Page::setParent().
| Name | Type | Description |
|---|---|---|
| $page | \Zend_Navigation_Page | array | \Zend_Config | page to add |
| Type | Description |
|---|---|
| \Zend_Navigation_Container | fluent interface, returns self |
| Exception | Description |
|---|---|
| \Zend_Navigation_Exception | if page is invalid |

addPages(array | \Zend_Config | \Zend_Navigation_Container $pages) : \Zend_Navigation_ContainerAdds several pages at once
Inherited from: \Zend_Navigation_Container::addPages()\Zend_Navigation_Page::addPages()| Name | Type | Description |
|---|---|---|
| $pages | array | \Zend_Config | \Zend_Navigation_Container | pages to add |
| Type | Description |
|---|---|
| \Zend_Navigation_Container | fluent interface, returns self |
| Exception | Description |
|---|---|
| \Zend_Navigation_Exception | if $pages is not array, Zend_Config or Zend_Navigation_Container |

addParams(array $params) : \Zend_Navigation_Page_MvcAdd multiple parameters (to use when assembling URL) at once
URL options passed to the url action helper for assembling URLs.
| Name | Type | Description |
|---|---|---|
| $params | array | paramters as array ('name' => 'value') |
| Type | Description |
|---|---|
| \Zend_Navigation_Page_Mvc | fluent interface, returns self |
- See
- \global\getHref()

addRel(string $relation, mixed $value) : \Zend_Navigation_Page
| Name | Type | Description |
|---|---|---|
| $relation | string | relation name (e.g. alternate, glossary, canonical, etc) |
| $value | mixed | value to set for relation |
| Type | Description |
|---|---|
| \Zend_Navigation_Page | fluent interface, returns self |

addRev(string $relation, mixed $value) : \Zend_Navigation_Page
| Name | Type | Description |
|---|---|---|
| $relation | string | relation name (e.g. alternate, glossary, canonical, etc) |
| $value | mixed | value to set for relation |
| Type | Description |
|---|---|
| \Zend_Navigation_Page | fluent interface, returns self |

clearCustomHtmlAttribs() : \Zend_Navigation_PageClear all custom HTML attributes
Inherited from: \Zend_Navigation_Page::clearCustomHtmlAttribs()| Type | Description |
|---|---|
| \Zend_Navigation_Page | fluent interface, returns self |

clearParams() : \Zend_Navigation_Page_MvcClear all parameters (to use when assembling URL)
| Type | Description |
|---|---|
| \Zend_Navigation_Page_Mvc | fluent interface, returns self |
- See
- \global\getHref()

count() : intReturns number of pages in container
Inherited from: \Zend_Navigation_Container::count()\Zend_Navigation_Page::count()Implements Countable interface.
| Type | Description |
|---|---|
| int | number of pages in the container |

current() : \Zend_Navigation_PageReturns current page
Inherited from: \Zend_Navigation_Container::current()\Zend_Navigation_Page::current()Implements RecursiveIterator interface.
| Type | Description |
|---|---|
| \Zend_Navigation_Page | current page or null |
| Exception | Description |
|---|---|
| \Zend_Navigation_Exception | if the index is invalid |

factory(array | \Zend_Config $options) : \Zend_Navigation_PageFactory for Zend_Navigation_Page classes
Inherited from: \Zend_Navigation_Page::factory()A specific type to construct can be specified by specifying the key 'type' in $options. If type is 'uri' or 'mvc', the type will be resolved to Zend_Navigation_Page_Uri or Zend_Navigation_Page_Mvc. Any other value for 'type' will be considered the full name of the class to construct. A valid custom page class must extend Zend_Navigation_Page.
If 'type' is not given, the type of page to construct will be determined by the following rules: - If $options contains either of the keys 'action', 'controller', 'module', or 'route', a Zend_Navigation_Page_Mvc page will be created. - If $options contains the key 'uri', a Zend_Navigation_Page_Uri page will be created.
| Name | Type | Description |
|---|---|---|
| $options | array | \Zend_Config | options used for creating page |
| Type | Description |
|---|---|
| \Zend_Navigation_Page | a page instance |
| Exception | Description |
|---|---|
| \Zend_Navigation_Exception | if $options is not array/Zend_Config |
| \Zend_Exception | if 'type' is specified and Zend_Loader is unable to load the class |
| \Zend_Navigation_Exception | if something goes wrong during instantiation of the page |
| \Zend_Navigation_Exception | if 'type' is given, and the specified type does not extend this class |
| \Zend_Navigation_Exception | if unable to determine which class to instantiate |

findAllBy(string $property, mixed $value, bool $useRegex = false) : arrayReturns all child pages matching $property == $value or preg_match($value, $property), or an empty array if no pages are found
Inherited from: \Zend_Navigation_Container::findAllBy()\Zend_Navigation_Page::findAllBy()| Name | Type | Description |
|---|---|---|
| $property | string | name of property to match against |
| $value | mixed | value to match property against |
| $useRegex | bool | [optional] if true PHP's preg_match is used. Default is false. |
| Type | Description |
|---|---|
| array | array containing only Zend_Navigation_Page instances |

findBy(string $property, mixed $value, bool $all = false, bool $useRegex = false) : \Zend_Navigation_Page | nullReturns page(s) matching $property == $value or preg_match($value, $property)
Inherited from: \Zend_Navigation_Container::findBy()\Zend_Navigation_Page::findBy()| Name | Type | Description |
|---|---|---|
| $property | string | name of property to match against |
| $value | mixed | value to match property against |
| $all | bool | [optional] whether an array of all matching pages should be returned, or only the first. If true, an array will be returned, even if not matching pages are found. If false, null will be returned if no matching page is found. Default is false. |
| $useRegex | bool | [optional] if true PHP's preg_match is used. Default is false. |
| Type | Description |
|---|---|
| \Zend_Navigation_Page | null | matching page or null |

findOneBy(string $property, mixed $value, bool $useRegex = false) : \Zend_Navigation_Page | nullReturns a child page matching $property == $value or preg_match($value, $property), or null if not found
Inherited from: \Zend_Navigation_Container::findOneBy()\Zend_Navigation_Page::findOneBy()| Name | Type | Description |
|---|---|---|
| $property | string | name of property to match against |
| $value | mixed | value to match property against |
| $useRegex | bool | [optional] if true PHP's preg_match is used. Default is false. |
| Type | Description |
|---|---|
| \Zend_Navigation_Page | null | matching page or null |

get(string $property) : mixed
If the given property is native (id, class, title, etc), the matching get method will be used. Otherwise, it will return the matching custom property, or null if not found.
| Name | Type | Description |
|---|---|---|
| $property | string | property name |
| Type | Description |
|---|---|
| mixed | the property's value or null |
| Exception | Description |
|---|---|
| \Zend_Navigation_Exception | if property name is invalid |

getAction() : string | nullReturns action name to use when assembling URL
| Type | Description |
|---|---|
| string | null | action name |
- See
- \global\getHref()

getActive(bool $recursive = false) : bool
| 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 |

getChildren() : \Zend_Navigation_Page | nullReturns the child container.
Inherited from: \Zend_Navigation_Container::getChildren()\Zend_Navigation_Page::getChildren()Implements RecursiveIterator interface.
| Type | Description |
|---|---|
| \Zend_Navigation_Page | null |

getController() : string | nullReturns controller name to use when assembling URL
| Type | Description |
|---|---|
| string | null | controller name or null |
- See
- \global\getHref()

getCustomHtmlAttrib(string $name) : string | nullReturns a single custom HTML attributes by name
Inherited from: \Zend_Navigation_Page::getCustomHtmlAttrib()| Name | Type | Description |
|---|---|---|
| $name | string | name of the HTML attribute |
| Type | Description |
|---|---|
| string | null | value for the HTML attribute or null |
| Exception | Description |
|---|---|
| \Zend_Navigation_Exception | if name is not string |

getCustomHtmlAttribs() : arrayReturns all custom HTML attributes as an array
Inherited from: \Zend_Navigation_Page::getCustomHtmlAttribs()| Type | Description |
|---|---|
| array | an array containing custom HTML attributes |

getCustomProperties() : arrayReturns custom properties as an array
Inherited from: \Zend_Navigation_Page::getCustomProperties()| Type | Description |
|---|---|
| array | an array containing custom properties |

getDefinedRel() : arrayReturns an array containing the defined forward relations
Inherited from: \Zend_Navigation_Page::getDefinedRel()| Type | Description |
|---|---|
| array | defined forward relations |

getDefinedRev() : arrayReturns an array containing the defined reverse relations
Inherited from: \Zend_Navigation_Page::getDefinedRev()| Type | Description |
|---|---|
| array | defined reverse relations |

getEncodeUrl() : boolReturns whether herf should be encoded when assembling URL
| Type | Description |
|---|---|
| bool | whether herf should be encoded when assembling URL |
- See
- \global\getHref()

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

getModule() : string | nullReturns module name to use when assembling URL
| Type | Description |
|---|---|
| string | null | module name or null |
- See
- \global\getHref()

getOrder() : int | nullReturns page order used in parent container
Inherited from: \Zend_Navigation_Page::getOrder()| Type | Description |
|---|---|
| int | null | page order or null |

getPages() : arrayReturns pages in the container
Inherited from: \Zend_Navigation_Container::getPages()\Zend_Navigation_Page::getPages()| Type | Description |
|---|---|
| array | array of Zend_Navigation_Page instances |

getParam(string $name) : mixedRetrieve a single parameter (to use when assembling URL)
| Name | Type | Description |
|---|---|---|
| $name | string | parameter name |
| Type | Description |
|---|---|
| mixed |
- See
- \global\getHref()

getParams() : arrayRetrieve all parameters (to use when assembling URL)
| Type | Description |
|---|---|
| array | parameters as array ('name' => 'value') |
- See
- \global\getHref()

getParent() : \Zend_Navigation_Container | null
| Type | Description |
|---|---|
| \Zend_Navigation_Container | null | parent container or null |

getPrivilege() : string | nullReturns ACL privilege associated with this page
Inherited from: \Zend_Navigation_Page::getPrivilege()| Type | Description |
|---|---|
| string | null | ACL privilege or null |

getRel(string $relation = null) : arrayReturns the page's forward links to other pages
Inherited from: \Zend_Navigation_Page::getRel()This method returns an associative array of forward links to other pages, where each element's key is the name of the relation (e.g. alternate, prev, next, help, etc), and the value is a mixed value that could somehow be considered a page.
| Name | Type | Description |
|---|---|---|
| $relation | string | [optional] name of relation to return. If not given, all relations will be returned. |
| Type | Description |
|---|---|
| array | an array of relations. If $relation is not specified, all relations will be returned in an associative array. |

getResetParams() : boolReturns whether params should be reset when assembling URL
| Type | Description |
|---|---|
| bool | whether params should be reset when assembling URL |
- See
- \global\getHref()

getResource() : string | \Zend_Acl_Resource_Interface | nullReturns ACL resource assoicated with this page
Inherited from: \Zend_Navigation_Page::getResource()| Type | Description |
|---|---|
| string | \Zend_Acl_Resource_Interface | null | ACL resource or null |

getRev(string $relation = null) : arrayReturns the page's reverse links to other pages
Inherited from: \Zend_Navigation_Page::getRev()This method returns an associative array of forward links to other pages, where each element's key is the name of the relation (e.g. alternate, prev, next, help, etc), and the value is a mixed value that could somehow be considered a page.
| Name | Type | Description |
|---|---|---|
| $relation | string | [optional] name of relation to return. If not given, all relations will be returned. |
| Type | Description |
|---|---|
| array | an array of relations. If $relation is not specified, all relations will be returned in an associative array. |

getRoute() : stringReturns route name to use when assembling URL
| Type | Description |
|---|---|
| string | route name |
- See
- \global\getHref()

getScheme() : string | nullReturns scheme to use when assembling URL
| Type | Description |
|---|---|
| string | null | scheme or null |
- See
- \global\getHref()

getVisible(bool $recursive = false) : bool
Returns a boolean value indicating whether the page is visible
| Name | Type | Description |
|---|---|---|
| $recursive | bool | [optional] whether page should be considered invisible if parent is invisible. Default is false. |
| Type | Description |
|---|---|
| bool | whether page should be considered visible |

hasChildren() : boolProxy to hasPages()
Inherited from: \Zend_Navigation_Container::hasChildren()\Zend_Navigation_Page::hasChildren()Implements RecursiveIterator interface.
| Type | Description |
|---|---|
| bool | whether container has any pages |

hasPage(\Zend_Navigation_Page $page, bool $recursive = false) : boolChecks if the container has the given page
Inherited from: \Zend_Navigation_Container::hasPage()\Zend_Navigation_Page::hasPage()| Name | Type | Description |
|---|---|---|
| $page | \Zend_Navigation_Page | page to look for |
| $recursive | bool | [optional] whether to search recursively. Default is false. |
| Type | Description |
|---|---|
| bool | whether page is in container |

hasPages() : boolReturns true if container contains any pages
Inherited from: \Zend_Navigation_Container::hasPages()\Zend_Navigation_Page::hasPages()| Type | Description |
|---|---|
| bool | whether container has any pages |

hashCode() : stringReturns a hash code value for the page
Inherited from: \Zend_Navigation_Page::hashCode()| Type | Description |
|---|---|
| string | a hash code value for this page |

isActive(bool $recursive = false) : boolReturns 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 |

isVisible(bool $recursive = false) : boolReturns a boolean value indicating whether the page is visible
Inherited from: \Zend_Navigation_Page::isVisible()| Name | Type | Description |
|---|---|---|
| $recursive | bool | [optional] whether page should be considered invisible if parent is invisible. Default is false. |
| Type | Description |
|---|---|
| bool | whether page should be considered visible |

key() : stringReturns hash code of current page
Inherited from: \Zend_Navigation_Container::key()\Zend_Navigation_Page::key()Implements RecursiveIterator interface.
| Type | Description |
|---|---|
| string | hash code of current page |

next() : voidMoves index pointer to next page in the container
Inherited from: \Zend_Navigation_Container::next()\Zend_Navigation_Page::next()Implements RecursiveIterator interface.

notifyOrderUpdated() : voidNotifies container that the order of pages are updated
Inherited from: \Zend_Navigation_Container::notifyOrderUpdated()\Zend_Navigation_Page::notifyOrderUpdated()
removeCustomHtmlAttrib(string $name) : \Zend_Navigation_PageRemoves a custom HTML attribute from the page
Inherited from: \Zend_Navigation_Page::removeCustomHtmlAttrib()| Name | Type | Description |
|---|---|---|
| $name | string | name of the custom HTML attribute |
| Type | Description |
|---|---|
| \Zend_Navigation_Page | fluent interface, returns self |

removePage(\Zend_Navigation_Page | int $page) : boolRemoves the given page from the container
Inherited from: \Zend_Navigation_Container::removePage()\Zend_Navigation_Page::removePage()| Name | Type | Description |
|---|---|---|
| $page | \Zend_Navigation_Page | int | page to remove, either a page instance or a specific page order |
| Type | Description |
|---|---|
| bool | whether the removal was successful |

removePages() : \Zend_Navigation_ContainerRemoves all pages in container
Inherited from: \Zend_Navigation_Container::removePages()\Zend_Navigation_Page::removePages()| Type | Description |
|---|---|
| \Zend_Navigation_Container | fluent interface, returns self |

removeParam(string $name) : boolRemove parameter (to use when assembling URL)
| Name | Type | Description |
|---|---|---|
| $name | string |
| Type | Description |
|---|---|
| bool |
- See
- \global\getHref()

removeRel(string $relation) : \Zend_Navigation_PageRemoves a forward relation from the page
Inherited from: \Zend_Navigation_Page::removeRel()| Name | Type | Description |
|---|---|---|
| $relation | string | name of relation to remove |
| Type | Description |
|---|---|
| \Zend_Navigation_Page | fluent interface, returns self |

removeRev(string $relation) : \Zend_Navigation_PageRemoves a reverse relation from the page
Inherited from: \Zend_Navigation_Page::removeRev()| Name | Type | Description |
|---|---|---|
| $relation | string | name of relation to remove |
| Type | Description |
|---|---|
| \Zend_Navigation_Page | fluent interface, returns self |

rewind() : voidSets index pointer to first page in the container
Inherited from: \Zend_Navigation_Container::rewind()\Zend_Navigation_Page::rewind()Implements RecursiveIterator interface.

set(string $property, mixed $value) : \Zend_Navigation_Page
If the given property is native (id, class, title, etc), the matching set method will be used. Otherwise, it will be set as a custom property.
| Name | Type | Description |
|---|---|---|
| $property | string | property name |
| $value | mixed | value to set |
| Type | Description |
|---|---|
| \Zend_Navigation_Page | fluent interface, returns self |
| Exception | Description |
|---|---|
| \Zend_Navigation_Exception | if property name is invalid |

setAccesskey(string | null $character = null) : \Zend_Navigation_Page
| Name | Type | Description |
|---|---|---|
| $character | string | null | [optional] access key to set. Default is null, which sets no access key. |
| Type | Description |
|---|---|
| \Zend_Navigation_Page | fluent interface, returns self |
| Exception | Description |
|---|---|
| \Zend_Navigation_Exception | if access key is not string or null or if the string length not equal to one |

setAction(string $action) : \Zend_Navigation_Page_MvcSets 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 |
- See
- \global\getHref()

setActive(bool $active = true) : \Zend_Navigation_PageSets whether page should be considered active or not
Inherited from: \Zend_Navigation_Page::setActive()| Name | Type | Description |
|---|---|---|
| $active | bool | [optional] whether page should be considered active or not. Default is true. |
| Type | Description |
|---|---|
| \Zend_Navigation_Page | fluent interface, returns self |

setClass(string | null $class = null) : \Zend_Navigation_Page
| Name | Type | Description |
|---|---|---|
| $class | string | null | [optional] CSS class to set. Default is null, which sets no CSS class. |
| Type | Description |
|---|---|
| \Zend_Navigation_Page | fluent interface, returns self |
| Exception | Description |
|---|---|
| \Zend_Navigation_Exception | if not given string or null |

setConfig(\Zend_Config $config) : \Zend_Navigation_PageSets page properties using a Zend_Config object
Inherited from: \Zend_Navigation_Page::setConfig()| Name | Type | Description |
|---|---|---|
| $config | \Zend_Config | config object to get properties from |
| Type | Description |
|---|---|
| \Zend_Navigation_Page | fluent interface, returns self |
| Exception | Description |
|---|---|
| \Zend_Navigation_Exception | if invalid options are given |

setController(string | null $controller) : \Zend_Navigation_Page_MvcSets 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 |
- See
- \global\getHref()

setCustomHtmlAttrib(string $name, string | null $value) : \Zend_Navigation_PageSets a single custom HTML attribute
Inherited from: \Zend_Navigation_Page::setCustomHtmlAttrib()| Name | Type | Description |
|---|---|---|
| $name | string | name of the HTML attribute |
| $value | string | null | value for the HTML attribute |
| Type | Description |
|---|---|
| \Zend_Navigation_Page | fluent interface, returns self |
| Exception | Description |
|---|---|
| \Zend_Navigation_Exception | if name is not string or value is not null or a string |

setCustomHtmlAttribs(array $attribs) : \Zend_Navigation_PageSets multiple custom HTML attributes at once
Inherited from: \Zend_Navigation_Page::setCustomHtmlAttribs()| Name | Type | Description |
|---|---|---|
| $attribs | array | an associative array of html attributes |
| Type | Description |
|---|---|
| \Zend_Navigation_Page | fluent interface, returns self |

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

setFragment(string $fragment) : \Zend_Navigation_Page
| Name | Type | Description |
|---|---|---|
| $fragment | string | new fragment identifier |
| Type | Description |
|---|---|
| \Zend_Navigation_Page | fluent interface, returns self |
| Exception | Description |
|---|---|
| \Zend_Navigation_Exception | if empty/no string is given |

setId(string | null $id = null) : \Zend_Navigation_Page
| Name | Type | Description |
|---|---|---|
| $id | string | null | [optional] id to set. Default is null, which sets no id. |
| Type | Description |
|---|---|
| \Zend_Navigation_Page | fluent interface, returns self |
| Exception | Description |
|---|---|
| \Zend_Navigation_Exception | if not given string or null |

setLabel(string $label) : \Zend_Navigation_Page
| Name | Type | Description |
|---|---|---|
| $label | string | new page label |
| Type | Description |
|---|---|
| \Zend_Navigation_Page | fluent interface, returns self |
| Exception | Description |
|---|---|
| \Zend_Navigation_Exception | if empty/no string is given |

setModule(string | null $module) : \Zend_Navigation_Page_MvcSets 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 |
- See
- \global\getHref()

setOptions(array $options) : \Zend_Navigation_PageSets page properties using options from an associative array
Inherited from: \Zend_Navigation_Page::setOptions()Each key in the array corresponds to the according set*() method, and each word is separated by underscores, e.g. the option 'target' corresponds to setTarget(), and the option 'reset_params' corresponds to the method setResetParams().
| Name | Type | Description |
|---|---|---|
| $options | array | associative array of options to set |
| Type | Description |
|---|---|
| \Zend_Navigation_Page | fluent interface, returns self |
| Exception | Description |
|---|---|
| \Zend_Navigation_Exception | if invalid options are given |

setOrder(int $order = null) : \Zend_Navigation_PageSets page order to use in parent container
Inherited from: \Zend_Navigation_Page::setOrder()| Name | Type | Description |
|---|---|---|
| $order | int | [optional] page order in container. Default is null, which sets no specific order. |
| Type | Description |
|---|---|
| \Zend_Navigation_Page | fluent interface, returns self |
| Exception | Description |
|---|---|
| \Zend_Navigation_Exception | if order is not integer or null |

setPages(array $pages) : \Zend_Navigation_ContainerSets pages this container should have, removing existing pages
Inherited from: \Zend_Navigation_Container::setPages()\Zend_Navigation_Page::setPages()| Name | Type | Description |
|---|---|---|
| $pages | array | pages to set |
| Type | Description |
|---|---|
| \Zend_Navigation_Container | fluent interface, returns self |

setParam(string $name, mixed $value) : \Zend_Navigation_Page_MvcSet parameter (to use when assembling URL)
URL option passed to the url action helper for assembling URLs.
| Name | Type | Description |
|---|---|---|
| $name | string | parameter name |
| $value | mixed | parameter value |
| Type | Description |
|---|---|
| \Zend_Navigation_Page_Mvc | fluent interface, returns self |
- See
- \global\getHref()

setParams(array | null $params = null) : \Zend_Navigation_Page_MvcSet 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!
| Name | Type | Description |
|---|---|---|
| $params | array | null | [optional] paramters as array ('name' => 'value'). Default is null which clears all params. |
| Type | Description |
|---|---|
| \Zend_Navigation_Page_Mvc | fluent interface, returns self |
- See
- \global\getHref()

setParent(\Zend_Navigation_Container $parent = null) : \Zend_Navigation_Page
| Name | Type | Description |
|---|---|---|
| $parent | \Zend_Navigation_Container | [optional] new parent to set. Default is null which will set no parent. |
| Type | Description |
|---|---|
| \Zend_Navigation_Page | fluent interface, returns self |

setPrivilege(string | null $privilege = null) : \Zend_Navigation_PageSets ACL privilege associated with this page
Inherited from: \Zend_Navigation_Page::setPrivilege()| Name | Type | Description |
|---|---|---|
| $privilege | string | null | [optional] ACL privilege to associate with this page. Default is null, which sets no privilege. |
| Type | Description |
|---|---|
| \Zend_Navigation_Page | fluent interface, returns self |

setRel(array | \Zend_Config $relations = null) : \Zend_Navigation_PageSets the page's forward links to other pages
Inherited from: \Zend_Navigation_Page::setRel()This method expects an associative array of forward links to other pages, where each element's key is the name of the relation (e.g. alternate, prev, next, help, etc), and the value is a mixed value that could somehow be considered a page.
| Name | Type | Description |
|---|---|---|
| $relations | array | \Zend_Config | [optional] an associative array of forward links to other pages |
| Type | Description |
|---|---|
| \Zend_Navigation_Page | fluent interface, returns self |

setResetParams(bool $resetParams) : \Zend_Navigation_Page_MvcSets 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 |
- See
- \global\getHref()

setResource(string | \Zend_Acl_Resource_Interface $resource = null) : \Zend_Navigation_PageSets ACL resource assoicated with this page
Inherited from: \Zend_Navigation_Page::setResource()| Name | Type | Description |
|---|---|---|
| $resource | string | \Zend_Acl_Resource_Interface | [optional] resource to associate with page. Default is null, which sets no resource. |
| Type | Description |
|---|---|
| \Zend_Navigation_Page | fluent interface, returns self |
| Exception | Description |
|---|---|
| \Zend_Navigation_Exception | if $resource if invalid |

setRev(array | \Zend_Config $relations = null) : \Zend_Navigation_PageSets the page's reverse links to other pages
Inherited from: \Zend_Navigation_Page::setRev()This method expects an associative array of reverse links to other pages, where each element's key is the name of the relation (e.g. alternate, prev, next, help, etc), and the value is a mixed value that could somehow be considered a page.
| Name | Type | Description |
|---|---|---|
| $relations | array | \Zend_Config | [optional] an associative array of reverse links to other pages |
| Type | Description |
|---|---|
| \Zend_Navigation_Page | fluent interface, returns self |

setRoute(string $route) : \Zend_Navigation_Page_MvcSets 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 |
- See
- \global\getHref()

setScheme(string | null $scheme) : \Zend_Navigation_Page_MvcSets scheme to use when assembling URL
| Name | Type | Description |
|---|---|---|
| $scheme | string | null | scheme |
| Type | Description |
|---|---|
| \Zend_Navigation_Page_Mvc | fluent interface, returns self |
- See
- \global\getHref()

setSchemeHelper(\Zend_View_Helper_ServerUrl $sh) : voidSets view helper for assembling URLs with schemes
| Name | Type | Description |
|---|---|---|
| $sh | \Zend_View_Helper_ServerUrl | scheme helper |
- See
- \global\getHref()

setTarget(string | null $target = null) : \Zend_Navigation_Page
| Name | Type | Description |
|---|---|---|
| $target | string | null | [optional] target to set. Default is null, which sets no target. |
| Type | Description |
|---|---|
| \Zend_Navigation_Page | fluent interface, returns self |
| Exception | Description |
|---|---|
| \Zend_Navigation_Exception | if target is not string or null |

setTitle(string $title = null) : \Zend_Navigation_Page
| Name | Type | Description |
|---|---|---|
| $title | string | [optional] page title. Default is null, which sets no title. |
| Type | Description |
|---|---|
| \Zend_Navigation_Page | fluent interface, returns self |
| Exception | Description |
|---|---|
| \Zend_Navigation_Exception | if not given string or null |

setUrlHelper(\Zend_Controller_Action_Helper_Url $uh) : voidSets action helper for assembling URLs
| Name | Type | Description |
|---|---|---|
| $uh | \Zend_Controller_Action_Helper_Url | URL helper |
- See
- \global\getHref()

setVisible(bool $visible = true) : \Zend_Navigation_PageSets whether the page should be visible or not
Inherited from: \Zend_Navigation_Page::setVisible()| Name | Type | Description |
|---|---|---|
| $visible | bool | [optional] whether page should be considered visible or not. Default is true. |
| Type | Description |
|---|---|
| \Zend_Navigation_Page | fluent interface, returns self |

toArray() : arrayReturns an array representation of the page
| Type | Description |
|---|---|
| array | associative array containing all page properties |

valid() : boolChecks if container index is valid
Inherited from: \Zend_Navigation_Container::valid()\Zend_Navigation_Page::valid()Implements RecursiveIterator interface.
| Type | Description |
|---|---|
| bool |