AbstractContainer class for Zend\Navigation\Page classes.
Methods
Magic overload: Proxy calls to finder methods
__call(string $method, array $arguments)
Inherited
Examples of finder calls:
// METHOD // SAME AS
$nav->findByLabel('foo'); // $nav->findOneBy('label', 'foo');
$nav->findOneByLabel('foo'); // $nav->findOneBy('label', 'foo');
$nav->findAllByClass('foo'); // $nav->findAllBy('class', 'foo');
| inherited_from |
\Zend\Navigation\AbstractContainer::__call() |
| inherited_from |
\Zend\Navigation\Page\AbstractPage::__call() |
Parameters
$method
stringmethod name
$arguments
arraymethod arguments
Exceptions
Page constructor
__construct(array | \Traversable $options)
Inherited
| inherited_from |
\Zend\Navigation\Page\AbstractPage::__construct() |
Parameters
$options
array\Traversable[optional] page options. Default is null, which should set defaults.
Exceptions
Returns a property, or null if it doesn't exist
__get(string $name) : mixed
Inherited
Magic overload for enabling
$page->propname
.
| inherited_from |
\Zend\Navigation\Page\AbstractPage::__get() |
Parameters
$name
stringproperty name
Exceptions
Returns
mixedproperty value or null
Checks if a property is set
__isset(string $name) : bool
Inherited
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).
| inherited_from |
\Zend\Navigation\Page\AbstractPage::__isset() |
Parameters
$name
stringproperty name
Returns
boolwhether the given property exists
Sets a custom property
__set(string $name, mixed $value) : void
Inherited
Magic overload for enabling
$page->propname = $value
.
| inherited_from |
\Zend\Navigation\Page\AbstractPage::__set() |
Parameters
$name
stringproperty name
Exceptions
Returns page label
__toString() : string
Inherited
Magic overload for enabling
echo $page
.
| inherited_from |
\Zend\Navigation\Page\AbstractPage::__toString() |
Returns
stringpage label
Unsets the given custom property
__unset(string $name) : void
Inherited
Magic overload for enabling
unset($page->propname)
.
| inherited_from |
\Zend\Navigation\Page\AbstractPage::__unset() |
Parameters
$name
stringproperty name
Exceptions
Adds a page to the container
addPage(\Zend\Navigation\Page\AbstractPage | array | \Traversable $page) : \Zend\Navigation\AbstractContainer
Inherited
This method will inject the container as the given page's parent by
calling Page\AbstractPage::setParent().
| inherited_from |
\Zend\Navigation\AbstractContainer::addPage() |
| inherited_from |
\Zend\Navigation\Page\AbstractPage::addPage() |
Parameters
Exceptions
Returns
Adds several pages at once
addPages(array | \Traversable | \Zend\Navigation\AbstractContainer $pages) : \Zend\Navigation\AbstractContainer
Inherited
| inherited_from |
\Zend\Navigation\AbstractContainer::addPages() |
| inherited_from |
\Zend\Navigation\Page\AbstractPage::addPages() |
Parameters
Exceptions
Returns
Adds a forward relation to the page
addRel(string $relation, mixed $value) : \Zend\Navigation\Page\AbstractPage
Inherited
| inherited_from |
\Zend\Navigation\Page\AbstractPage::addRel() |
Parameters
$relation
stringrelation name (e.g. alternate, glossary, canonical, etc)
$value
mixedvalue to set for relation
Returns
Adds a reverse relation to the page
addRev(string $relation, mixed $value) : \Zend\Navigation\Page\AbstractPage
Inherited
| inherited_from |
\Zend\Navigation\Page\AbstractPage::addRev() |
Parameters
$relation
stringrelation name (e.g. alternate, glossary, canonical, etc)
$value
mixedvalue to set for relation
Returns
Returns number of pages in container
count() : int
Inherited
Implements Countable interface.
| inherited_from |
\Zend\Navigation\AbstractContainer::count() |
| inherited_from |
\Zend\Navigation\Page\AbstractPage::count() |
Returns
intnumber of pages in the container
Returns current page
current() : \Zend\Navigation\Page\AbstractPage
Inherited
Implements RecursiveIterator interface.
| inherited_from |
\Zend\Navigation\AbstractContainer::current() |
| inherited_from |
\Zend\Navigation\Page\AbstractPage::current() |
Exceptions
Returns
Factory for Zend_Navigation_Page classes
factory(array | \Traversable $options) : \Zend\Navigation\Page\AbstractPage
Inherited
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',
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.
| inherited_from |
\Zend\Navigation\Page\AbstractPage::factory() |
Parameters
$options
array\Traversableoptions used for creating page
Exceptions
Returns
Returns all child pages matching $property == $value, or an empty array
if no pages are found
findAllBy(string $property, mixed $value) : array
Inherited
| inherited_from |
\Zend\Navigation\AbstractContainer::findAllBy() |
| inherited_from |
\Zend\Navigation\Page\AbstractPage::findAllBy() |
Parameters
$property
stringname of property to match against
$value
mixedvalue to match property against
Returns
arrayarray containing only Page\AbstractPage instances
Returns page(s) matching $property == $value
findBy(string $property, mixed $value, bool $all) : \Zend\Navigation\Page\AbstractPage | null
Inherited
| inherited_from |
\Zend\Navigation\AbstractContainer::findBy() |
| inherited_from |
\Zend\Navigation\Page\AbstractPage::findBy() |
Parameters
$property
stringname of property to match against
$value
mixedvalue 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.
Returns
Returns a child page matching $property == $value, or null if not found
findOneBy(string $property, mixed $value) : \Zend\Navigation\Page\AbstractPage | null
Inherited
| inherited_from |
\Zend\Navigation\AbstractContainer::findOneBy() |
| inherited_from |
\Zend\Navigation\Page\AbstractPage::findOneBy() |
Parameters
$property
stringname of property to match against
$value
mixedvalue to match property against
Returns
Returns the value of the given property
get(string $property) : mixed
Inherited
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.
| inherited_from |
\Zend\Navigation\Page\AbstractPage::get() |
Parameters
$property
stringproperty name
Exceptions
Returns
mixedthe property's value or null
Proxy to isActive()
getActive(bool $recursive) : bool
Inherited
| inherited_from |
\Zend\Navigation\Page\AbstractPage::getActive() |
Parameters
$recursive
bool[optional] whether page should be considered active if any child pages are active. Default is false.
Returns
boolwhether page should be considered active
Returns the child container.
getChildren() : \Zend\Navigation\Page\AbstractPage | null
Inherited
Implements RecursiveIterator interface.
| inherited_from |
\Zend\Navigation\AbstractContainer::getChildren() |
| inherited_from |
\Zend\Navigation\Page\AbstractPage::getChildren() |
Returns
Returns page class (CSS)
getClass() : string | null
Inherited
| inherited_from |
\Zend\Navigation\Page\AbstractPage::getClass() |
Returns
stringnullpage's CSS class or null
Returns custom properties as an array
getCustomProperties() : array
Inherited
| inherited_from |
\Zend\Navigation\Page\AbstractPage::getCustomProperties() |
Returns
arrayan array containing custom properties
Returns an array containing the defined forward relations
getDefinedRel() : array
Inherited
| inherited_from |
\Zend\Navigation\Page\AbstractPage::getDefinedRel() |
Returns
arraydefined forward relations
Returns an array containing the defined reverse relations
getDefinedRev() : array
Inherited
| inherited_from |
\Zend\Navigation\Page\AbstractPage::getDefinedRev() |
Returns
arraydefined reverse relations
Returns fragment identifier
getFragment() : string | null
Inherited
| inherited_from |
\Zend\Navigation\Page\AbstractPage::getFragment() |
Returns
stringnullfragment identifier
Returns href for this page
getHref() : string
Includes the fragment identifier if it is set.
Returns
string
Returns page id
getId() : string | null
Inherited
| inherited_from |
\Zend\Navigation\Page\AbstractPage::getId() |
Returns
stringnullpage id or null
Returns page label
getLabel() : string
Inherited
| inherited_from |
\Zend\Navigation\Page\AbstractPage::getLabel() |
Returns
stringpage label or null
Returns page order used in parent container
getOrder() : int | null
Inherited
| inherited_from |
\Zend\Navigation\Page\AbstractPage::getOrder() |
Returns
intnullpage order or null
Returns pages in the container
getPages() : array
Inherited
| inherited_from |
\Zend\Navigation\AbstractContainer::getPages() |
| inherited_from |
\Zend\Navigation\Page\AbstractPage::getPages() |
Returns
arrayarray of Page\AbstractPage instances
Returns ACL privilege associated with this page
getPrivilege() : string | null
Inherited
| inherited_from |
\Zend\Navigation\Page\AbstractPage::getPrivilege() |
Returns
stringnullACL privilege or null
Returns the page's forward links to other pages
getRel(string $relation) : array
Inherited
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.
| inherited_from |
\Zend\Navigation\Page\AbstractPage::getRel() |
Parameters
$relation
string[optional] name of relation to return. If not given, all relations will be returned.
Returns
arrayan array of relations. If $relation is not specified, all relations will be returned in an associative array.
Returns the page's reverse links to other pages
getRev(string $relation) : array
Inherited
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.
| inherited_from |
\Zend\Navigation\Page\AbstractPage::getRev() |
Parameters
$relation
string[optional] name of relation to return. If not given, all relations will be returned.
Returns
arrayan array of relations. If $relation is not specified, all relations will be returned in an associative array.
Returns page target
getTarget() : string | null
Inherited
| inherited_from |
\Zend\Navigation\Page\AbstractPage::getTarget() |
Returns
stringnullpage target or null
Returns page title
getTitle() : string | null
Inherited
| inherited_from |
\Zend\Navigation\Page\AbstractPage::getTitle() |
Returns
stringnullpage title or null
Returns URI
getUri() : string
Proxy to isVisible()
getVisible(bool $recursive) : bool
Inherited
Returns a boolean value indicating whether the page is visible
| inherited_from |
\Zend\Navigation\Page\AbstractPage::getVisible() |
Parameters
$recursive
bool[optional] whether page should be considered invisible if parent is invisible. Default is false.
Returns
boolwhether page should be considered visible
Proxy to hasPages()
hasChildren() : bool
Inherited
Implements RecursiveIterator interface.
| inherited_from |
\Zend\Navigation\AbstractContainer::hasChildren() |
| inherited_from |
\Zend\Navigation\Page\AbstractPage::hasChildren() |
Returns
boolwhether container has any pages
Checks if the container has the given page
hasPage(\Zend\Navigation\Page\AbstractPage $page, bool $recursive) : bool
Inherited
| inherited_from |
\Zend\Navigation\AbstractContainer::hasPage() |
| inherited_from |
\Zend\Navigation\Page\AbstractPage::hasPage() |
Parameters
$recursive
bool[optional] whether to search recursively. Default is false.
Returns
boolwhether page is in container
Returns true if container contains any pages
hasPages() : bool
Inherited
| inherited_from |
\Zend\Navigation\AbstractContainer::hasPages() |
| inherited_from |
\Zend\Navigation\Page\AbstractPage::hasPages() |
Returns
boolwhether container has any pages
Returns a hash code value for the page
hashCode() : string
Inherited
| inherited_from |
\Zend\Navigation\Page\AbstractPage::hashCode() |
Returns
stringa hash code value for this page
Returns whether page should be considered active or not
isActive(bool $recursive) : bool
Inherited
| inherited_from |
\Zend\Navigation\Page\AbstractPage::isActive() |
Parameters
$recursive
bool[optional] whether page should be considered active if any child pages are active. Default is false.
Returns
boolwhether page should be considered active
Returns a boolean value indicating whether the page is visible
isVisible(bool $recursive) : bool
Inherited
| inherited_from |
\Zend\Navigation\Page\AbstractPage::isVisible() |
Parameters
$recursive
bool[optional] whether page should be considered invisible if parent is invisible. Default is false.
Returns
boolwhether page should be considered visible
Returns hash code of current page
key() : string
Inherited
Implements RecursiveIterator interface.
| inherited_from |
\Zend\Navigation\AbstractContainer::key() |
| inherited_from |
\Zend\Navigation\Page\AbstractPage::key() |
Returns
stringhash code of current page
Moves index pointer to next page in the container
next() : void
Inherited
Implements RecursiveIterator interface.
| inherited_from |
\Zend\Navigation\AbstractContainer::next() |
| inherited_from |
\Zend\Navigation\Page\AbstractPage::next() |
Notifies container that the order of pages are updated
notifyOrderUpdated() : void
Inherited
| inherited_from |
\Zend\Navigation\AbstractContainer::notifyOrderUpdated() |
| inherited_from |
\Zend\Navigation\Page\AbstractPage::notifyOrderUpdated() |
Removes the given page from the container
removePage(\Zend\Navigation\Page\AbstractPage | int $page) : bool
Inherited
| inherited_from |
\Zend\Navigation\AbstractContainer::removePage() |
| inherited_from |
\Zend\Navigation\Page\AbstractPage::removePage() |
Parameters
Returns
boolwhether the removal was successful
Removes all pages in container
removePages() : \Zend\Navigation\AbstractContainer
Inherited
| inherited_from |
\Zend\Navigation\AbstractContainer::removePages() |
| inherited_from |
\Zend\Navigation\Page\AbstractPage::removePages() |
Returns
Removes a forward relation from the page
removeRel(string $relation) : \Zend\Navigation\Page\AbstractPage
Inherited
| inherited_from |
\Zend\Navigation\Page\AbstractPage::removeRel() |
Parameters
$relation
stringname of relation to remove
Returns
Removes a reverse relation from the page
removeRev(string $relation) : \Zend\Navigation\Page\AbstractPage
Inherited
| inherited_from |
\Zend\Navigation\Page\AbstractPage::removeRev() |
Parameters
$relation
stringname of relation to remove
Returns
Sets index pointer to first page in the container
rewind() : void
Inherited
Implements RecursiveIterator interface.
| inherited_from |
\Zend\Navigation\AbstractContainer::rewind() |
| inherited_from |
\Zend\Navigation\Page\AbstractPage::rewind() |
Sets the given property
set(string $property, mixed $value) : \Zend\Navigation\Page\AbstractPage
Inherited
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.
| inherited_from |
\Zend\Navigation\Page\AbstractPage::set() |
Parameters
$property
stringproperty name
Exceptions
Returns
Sets whether page should be considered active or not
setActive(bool $active) : \Zend\Navigation\Page\AbstractPage
Inherited
| inherited_from |
\Zend\Navigation\Page\AbstractPage::setActive() |
Parameters
$active
bool[optional] whether page should be considered active or not. Default is true.
Returns
Sets page CSS class
setClass(string | null $class) : \Zend\Navigation\Page\AbstractPage
Inherited
| inherited_from |
\Zend\Navigation\Page\AbstractPage::setClass() |
Parameters
$class
stringnull[optional] CSS class to set. Default is null, which sets no CSS class.
Exceptions
Returns
Sets a fragment identifier
setFragment(string $fragment) : \Zend\Navigation\Page\AbstractPage
Inherited
| inherited_from |
\Zend\Navigation\Page\AbstractPage::setFragment() |
Parameters
$fragment
stringnew fragment identifier
Exceptions
Returns
Sets page id
setId(string | null $id) : \Zend\Navigation\Page\AbstractPage
Inherited
| inherited_from |
\Zend\Navigation\Page\AbstractPage::setId() |
Parameters
$id
stringnull[optional] id to set. Default is null, which sets no id.
Exceptions
Returns
Sets page label
setLabel(string $label) : \Zend\Navigation\Page\AbstractPage
Inherited
| inherited_from |
\Zend\Navigation\Page\AbstractPage::setLabel() |
Parameters
$label
stringnew page label
Exceptions
Returns
Sets page properties using options from an associative array
setOptions(array $options) : \Zend\Navigation\Page\AbstractPage
Inherited
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().
| inherited_from |
\Zend\Navigation\Page\AbstractPage::setOptions() |
Parameters
$options
arrayassociative array of options to set
Exceptions
Returns
Sets page order to use in parent container
setOrder(int $order) : \Zend\Navigation\Page\AbstractPage
Inherited
| inherited_from |
\Zend\Navigation\Page\AbstractPage::setOrder() |
Parameters
$order
int[optional] page order in container. Default is null, which sets no specific order.
Exceptions
Returns
Sets pages this container should have, removing existing pages
setPages(array $pages) : \Zend\Navigation\AbstractContainer
Inherited
| inherited_from |
\Zend\Navigation\AbstractContainer::setPages() |
| inherited_from |
\Zend\Navigation\Page\AbstractPage::setPages() |
Parameters
Returns
Sets parent container
setParent(\Zend\Navigation\AbstractContainer $parent) : \Zend\Navigation\Page\AbstractPage
Inherited
| inherited_from |
\Zend\Navigation\Page\AbstractPage::setParent() |
Parameters
Exceptions
Returns
Sets ACL privilege associated with this page
setPrivilege(string | null $privilege) : \Zend\Navigation\Page\AbstractPage
Inherited
| inherited_from |
\Zend\Navigation\Page\AbstractPage::setPrivilege() |
Parameters
$privilege
stringnull[optional] ACL privilege to associate with this page. Default is null, which sets no privilege.
Returns
Sets the page's forward links to other pages
setRel(array | \Traversable $relations) : \Zend\Navigation\Page\AbstractPage
Inherited
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.
| inherited_from |
\Zend\Navigation\Page\AbstractPage::setRel() |
Parameters
$relations
array\Traversable[optional] an associative array of forward links to other pages
Exceptions
Returns
Sets the page's reverse links to other pages
setRev(array | \Traversable $relations) : \Zend\Navigation\Page\AbstractPage
Inherited
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.
| inherited_from |
\Zend\Navigation\Page\AbstractPage::setRev() |
Parameters
$relations
array\Traversable[optional] an associative array of reverse links to other pages
Exceptions
Returns
Sets page target
setTarget(string | null $target) : \Zend\Navigation\Page\AbstractPage
Inherited
| inherited_from |
\Zend\Navigation\Page\AbstractPage::setTarget() |
Parameters
$target
stringnull[optional] target to set. Default is null, which sets no target.
Exceptions
Returns
Sets page title
setTitle(string $title) : \Zend\Navigation\Page\AbstractPage
Inherited
| inherited_from |
\Zend\Navigation\Page\AbstractPage::setTitle() |
Parameters
$title
string[optional] page title. Default is null, which sets no title.
Exceptions
Returns
Sets page URI
setUri(string $uri) : \Zend\Navigation\Page\Uri
Parameters
$uri
stringpage URI, must a string or null
Exceptions
Returns
Sets whether the page should be visible or not
setVisible(bool $visible) : \Zend\Navigation\Page\AbstractPage
Inherited
| inherited_from |
\Zend\Navigation\Page\AbstractPage::setVisible() |
Parameters
$visible
bool[optional] whether page should be considered visible or not. Default is true.
Returns
Returns an array representation of the page
toArray() : array
Checks if container index is valid
valid() : bool
Inherited
Implements RecursiveIterator interface.
| inherited_from |
\Zend\Navigation\AbstractContainer::valid() |
| inherited_from |
\Zend\Navigation\Page\AbstractPage::valid() |
Returns
bool
Initializes page (used by subclasses)
init() : void
Inherited
| inherited_from |
\Zend\Navigation\Page\AbstractPage::init() |
Normalizes a property name
normalizePropertyName(string $property) : string
Inherited
| inherited_from |
\Zend\Navigation\Page\AbstractPage::normalizePropertyName() |
Parameters
$property
stringproperty name to normalize
Returns
stringnormalized property name
Sorts the page index according to page order
sort() : void
Inherited
| inherited_from |
\Zend\Navigation\AbstractContainer::sort() |
| inherited_from |
\Zend\Navigation\Page\AbstractPage::sort() |
Properties
Whether this page should be considered active
$active : bool
Inherited
| inherited_from |
\Zend\Navigation\Page\AbstractPage::$$active |
Style class for this page (CSS)
$class : string | null
Inherited
| inherited_from |
\Zend\Navigation\Page\AbstractPage::$$class |
Whether index is dirty and needs to be re-arranged
$dirtyIndex : bool
Inherited
| inherited_from |
\Zend\Navigation\AbstractContainer::$$dirtyIndex |
| inherited_from |
\Zend\Navigation\Page\AbstractPage::$$dirtyIndex |
Fragment identifier (anchor identifier)
$fragment : string | null
Inherited
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)
Page id
$id : string | null
Inherited
| inherited_from |
\Zend\Navigation\Page\AbstractPage::$$id |
An index that contains the order in which to iterate pages
$index : array
Inherited
| inherited_from |
\Zend\Navigation\AbstractContainer::$$index |
| inherited_from |
\Zend\Navigation\Page\AbstractPage::$$index |
Page label
$label : string | null
Inherited
| inherited_from |
\Zend\Navigation\Page\AbstractPage::$$label |
Page order used by parent container
$order : int | null
Inherited
| inherited_from |
\Zend\Navigation\Page\AbstractPage::$$order |
Contains sub pages
$pages : array
Inherited
| inherited_from |
\Zend\Navigation\AbstractContainer::$$pages |
| inherited_from |
\Zend\Navigation\Page\AbstractPage::$$pages |
ACL privilege associated with this page
$privilege : string | null
Inherited
| inherited_from |
\Zend\Navigation\Page\AbstractPage::$$privilege |
Custom page properties, used by __set(), __get() and __isset()
$properties : array
Inherited
| inherited_from |
\Zend\Navigation\Page\AbstractPage::$$properties |
Forward links to other pages
$rel : array
Inherited
Reverse links to other pages
$rev : array
Inherited
This page's target
$target : string | null
Inherited
| inherited_from |
\Zend\Navigation\Page\AbstractPage::$$target |
A more descriptive title for this page
$title : string | null
Inherited
| inherited_from |
\Zend\Navigation\Page\AbstractPage::$$title |
Page URI
$uri : string | null
Whether this page should be considered visible
$visible : bool
Inherited
| inherited_from |
\Zend\Navigation\Page\AbstractPage::$$visible |