__call()
__construct()
__get()
__isset()
__set()
__toString()
__unset()
addFactory()
addPage()
addPages()
addRel()
addRev()
count()
current()
factory()
findAllBy()
findBy()
findOneBy()
get()
getActive()
getChildren()
getClass()
getCustomProperties()
getDefinedRel()
getDefinedRev()
getFragment()
getHref()
getId()
getLabel()
getOrder()
getPages()
getParent()
getPermission()
getPrivilege()
getRel()
getResource()
getRev()
getTarget()
getTextDomain()
getTitle()
getVisible()
hasChildren()
hasPage()
hasPages()
hashCode()
isActive()
isVisible()
key()
next()
notifyOrderUpdated()
removePage()
removePages()
removeRel()
removeRev()
rewind()
set()
setActive()
setClass()
setFragment()
setId()
setLabel()
setOptions()
setOrder()
setPages()
setParent()
setPermission()
setPrivilege()
setRel()
setResource()
setRev()
setTarget()
setTextDomain()
setTitle()
setVisible()
toArray()
valid()
init()
normalizePropertyName()
sort()
$active
$class
$dirtyIndex
$factories
$fragment
$id
$index
$label
$order
$pages
$parent
$permission
$privilege
$properties
$rel
$resource
$rev
$target
$textDomain
$title
$visible
Base class for Zend\Navigation\Page pages
AbstractContainer class for Zend\Navigation\Page classes.
__call(string $method, array $arguments)
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() |
|---|
stringmethod name
arraymethod arguments
\Zend\Navigation\Exception\BadMethodCallException |
if method does not exist |
|---|
__construct(array | \Traversable $options)
array\Traversable[optional] page options. Default is null, which should set defaults.
\Zend\Navigation\Exception\InvalidArgumentException |
if invalid options are given |
|---|
__get(string $name) : mixed
Magic overload for enabling
$page->propname
.
stringproperty name
\Zend\Navigation\Exception\InvalidArgumentException |
if property name is invalid |
|---|
mixedproperty value or null__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).
stringproperty name
boolwhether the given property exists__set(string $name, mixed $value) : void
Magic overload for enabling
$page->propname = $value
.
stringproperty name
mixedvalue to set
\Zend\Navigation\Exception\InvalidArgumentException |
if property name is invalid |
|---|
__toString() : string
Magic overload for enabling
echo $page
.
stringpage label__unset(string $name) : void
Magic overload for enabling
unset($page->propname)
.
stringproperty name
\Zend\Navigation\Exception\InvalidArgumentException |
if the property is native |
|---|
addFactory(\Zend\Navigation\Page\callable $callback)
\Zend\Navigation\Page\callableAny callable variable
addPage(\Zend\Navigation\Page\AbstractPage | array | \Traversable $page) : \Zend\Navigation\self
This method will inject the container as the given page's parent by calling Page\AbstractPage::setParent().
| inherited_from | \Zend\Navigation\AbstractContainer::addPage() |
|---|
\Zend\Navigation\Exception\InvalidArgumentException |
if page is invalid |
|---|
\Zend\Navigation\selffluent interface, returns selfaddPages(array | \Traversable | \Zend\Navigation\AbstractContainer $pages) : \Zend\Navigation\self
| inherited_from | \Zend\Navigation\AbstractContainer::addPages() |
|---|
\Zend\Navigation\Exception\InvalidArgumentException |
if $pages is not array, Traversable or AbstractContainer |
|---|
\Zend\Navigation\selffluent interface, returns selfaddRel(string $relation, mixed $value) : \Zend\Navigation\Page\AbstractPage
stringrelation name (e.g. alternate, glossary, canonical, etc)
mixedvalue to set for relation
\Zend\Navigation\Page\AbstractPagefluent interface, returns selfaddRev(string $relation, mixed $value) : \Zend\Navigation\Page\AbstractPage
stringrelation name (e.g. alternate, glossary, canonical, etc)
mixedvalue to set for relation
\Zend\Navigation\Page\AbstractPagefluent interface, returns selfcount() : int
Implements Countable interface.
| inherited_from | \Zend\Navigation\AbstractContainer::count() |
|---|
intnumber of pages in the containercurrent() : \Zend\Navigation\Page\AbstractPage
Implements RecursiveIterator interface.
| inherited_from | \Zend\Navigation\AbstractContainer::current() |
|---|
\Zend\Navigation\Exception\OutOfBoundsException |
if the index is invalid |
|---|
\Zend\Navigation\Page\AbstractPagecurrent page or nullfactory(array | \Traversable $options) : \Zend\Navigation\Page\AbstractPage
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\AbstractPage.
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.
array\Traversableoptions used for creating page
\Zend\Navigation\Exception\InvalidArgumentException |
if $options is not array/Traversable |
|---|---|
\Zend\Navigation\Exception\InvalidArgumentException |
if 'type' is specified but class not found |
\Zend\Navigation\Exception\InvalidArgumentException |
if something goes wrong during instantiation of the page |
\Zend\Navigation\Exception\InvalidArgumentException |
if 'type' is given, and the specified type does not extend this class |
\Zend\Navigation\Exception\InvalidArgumentException |
if unable to determine which class to instantiate |
\Zend\Navigation\Page\AbstractPagea page instancefindAllBy(string $property, mixed $value) : array
| inherited_from | \Zend\Navigation\AbstractContainer::findAllBy() |
|---|
stringname of property to match against
mixedvalue to match property against
arrayarray containing only Page\AbstractPage instancesfindBy(string $property, mixed $value, bool $all) : \Zend\Navigation\Page\AbstractPage | null
| inherited_from | \Zend\Navigation\AbstractContainer::findBy() |
|---|
stringname of property to match against
mixedvalue to match property against
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.
\Zend\Navigation\Page\AbstractPagenullmatching page or nullfindOneBy(string $property, mixed $value) : \Zend\Navigation\Page\AbstractPage | null
| inherited_from | \Zend\Navigation\AbstractContainer::findOneBy() |
|---|
stringname of property to match against
mixedvalue to match property against
\Zend\Navigation\Page\AbstractPagenullmatching page or nullget(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.
stringproperty name
\Zend\Navigation\Exception\InvalidArgumentException |
if property name is invalid |
|---|
mixedthe property's value or nullgetActive(bool $recursive) : bool
bool[optional] whether page should be considered active if any child pages are active. Default is false.
boolwhether page should be considered activegetChildren() : \Zend\Navigation\Page\AbstractPage | null
Implements RecursiveIterator interface.
| inherited_from | \Zend\Navigation\AbstractContainer::getChildren() |
|---|
getClass() : string | null
stringnullpage's CSS class or nullgetCustomProperties() : array
arrayan array containing custom propertiesgetDefinedRel() : array
arraydefined forward relationsgetDefinedRev() : array
arraydefined reverse relationsgetFragment() : string | null
stringnullfragment identifiergetHref() : string
stringthe page's hrefgetId() : string | null
stringnullpage id or nullgetLabel() : string
stringpage label or nullgetOrder() : int | null
intnullpage order or nullgetPages() : array
| inherited_from | \Zend\Navigation\AbstractContainer::getPages() |
|---|
arrayarray of Page\AbstractPage instancesgetParent() : \Zend\Navigation\AbstractContainer | null
\Zend\Navigation\AbstractContainernullparent container or nullgetPermission() : mixed | null
mixednullpermission or nullgetPrivilege() : string | null
stringnullACL privilege or nullgetRel(string $relation) : array
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.
string[optional] name of relation to return. If not given, all relations will be returned.
arrayan array of relations. If $relation is not specified, all relations will be returned in an associative array.getResource() : string | \Zend\Permissions\Acl\Resource\ResourceInterface | null
getRev(string $relation) : array
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.
string[optional] name of relation to return. If not given, all relations will be returned.
arrayan array of relations. If $relation is not specified, all relations will be returned in an associative array.getTarget() : string | null
stringnullpage target or nullgetTextDomain() : mixed | null
mixednulltext domain or nullgetTitle() : string | null
stringnullpage title or nullgetVisible(bool $recursive) : bool
Returns a boolean value indicating whether the page is visible
bool[optional] whether page should be considered invisible if parent is invisible. Default is false.
boolwhether page should be considered visiblehasChildren() : bool
Implements RecursiveIterator interface.
| inherited_from | \Zend\Navigation\AbstractContainer::hasChildren() |
|---|
boolwhether container has any pageshasPage(\Zend\Navigation\Page\AbstractPage $page, bool $recursive) : bool
| inherited_from | \Zend\Navigation\AbstractContainer::hasPage() |
|---|
bool[optional] whether to search recursively. Default is false.
boolwhether page is in containerhasPages(bool $onlyVisible) : bool
| inherited_from | \Zend\Navigation\AbstractContainer::hasPages() |
|---|
boolwhether to check only visible pages
boolwhether container has any pageshashCode() : string
stringa hash code value for this pageisActive(bool $recursive) : bool
bool[optional] whether page should be considered active if any child pages are active. Default is false.
boolwhether page should be considered activeisVisible(bool $recursive) : bool
bool[optional] whether page should be considered invisible if parent is invisible. Default is false.
boolwhether page should be considered visiblekey() : string
Implements RecursiveIterator interface.
| inherited_from | \Zend\Navigation\AbstractContainer::key() |
|---|
stringhash code of current pagenext() : void
Implements RecursiveIterator interface.
| inherited_from | \Zend\Navigation\AbstractContainer::next() |
|---|
notifyOrderUpdated() : void
| inherited_from | \Zend\Navigation\AbstractContainer::notifyOrderUpdated() |
|---|
removePage(\Zend\Navigation\Page\AbstractPage | int $page, bool $recursive) : bool
| inherited_from | \Zend\Navigation\AbstractContainer::removePage() |
|---|
\Zend\Navigation\Page\AbstractPageintpage to remove, either a page instance or a specific page order
bool[optional] whether to remove recursively
boolwhether the removal was successfulremovePages() : \Zend\Navigation\self
| inherited_from | \Zend\Navigation\AbstractContainer::removePages() |
|---|
\Zend\Navigation\selffluent interface, returns selfremoveRel(string $relation) : \Zend\Navigation\Page\AbstractPage
stringname of relation to remove
\Zend\Navigation\Page\AbstractPagefluent interface, returns selfremoveRev(string $relation) : \Zend\Navigation\Page\AbstractPage
stringname of relation to remove
\Zend\Navigation\Page\AbstractPagefluent interface, returns selfrewind() : void
Implements RecursiveIterator interface.
| inherited_from | \Zend\Navigation\AbstractContainer::rewind() |
|---|
set(string $property, mixed $value) : \Zend\Navigation\Page\AbstractPage
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.
stringproperty name
mixedvalue to set
\Zend\Navigation\Exception\InvalidArgumentException |
if property name is invalid |
|---|
\Zend\Navigation\Page\AbstractPagefluent interface, returns selfsetActive(bool $active) : \Zend\Navigation\Page\AbstractPage
bool[optional] whether page should be considered active or not. Default is true.
\Zend\Navigation\Page\AbstractPagefluent interface, returns selfsetClass(string | null $class) : \Zend\Navigation\Page\AbstractPage
stringnull[optional] CSS class to set. Default is null, which sets no CSS class.
\Zend\Navigation\Exception\InvalidArgumentException |
if not given string or null |
|---|
\Zend\Navigation\Page\AbstractPagefluent interface, returns selfsetFragment(string $fragment) : \Zend\Navigation\Page\AbstractPage
stringnew fragment identifier
\Zend\Navigation\Exception\InvalidArgumentException |
if empty/no string is given |
|---|
\Zend\Navigation\Page\AbstractPagefluent interface, returns selfsetId(string | null $id) : \Zend\Navigation\Page\AbstractPage
stringnull[optional] id to set. Default is null, which sets no id.
\Zend\Navigation\Exception\InvalidArgumentException |
if not given string or null |
|---|
\Zend\Navigation\Page\AbstractPagefluent interface, returns selfsetLabel(string $label) : \Zend\Navigation\Page\AbstractPage
stringnew page label
\Zend\Navigation\Exception\InvalidArgumentException |
if empty/no string is given |
|---|
\Zend\Navigation\Page\AbstractPagefluent interface, returns selfsetOptions(array $options) : \Zend\Navigation\Page\AbstractPage
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().
arrayassociative array of options to set
\Zend\Navigation\Exception\InvalidArgumentException |
if invalid options are given |
|---|
\Zend\Navigation\Page\AbstractPagefluent interface, returns selfsetOrder(int $order) : \Zend\Navigation\Page\AbstractPage
int[optional] page order in container. Default is null, which sets no specific order.
\Zend\Navigation\Exception\InvalidArgumentException |
if order is not integer or null |
|---|
\Zend\Navigation\Page\AbstractPagefluent interface, returns selfsetPages(array $pages) : \Zend\Navigation\self
| inherited_from | \Zend\Navigation\AbstractContainer::setPages() |
|---|
arraypages to set
\Zend\Navigation\selffluent interface, returns selfsetParent(\Zend\Navigation\AbstractContainer $parent) : \Zend\Navigation\Page\AbstractPage
\Zend\Navigation\AbstractContainer[optional] new parent to set. Default is null which will set no parent.
\Zend\Navigation\Exception\InvalidArgumentException |
|---|
\Zend\Navigation\Page\AbstractPagefluent interface, returns selfsetPermission(mixed | null $permission) : \Zend\Navigation\Page\AbstractPage
mixednull[optional] permission to associate with this page. Default is null, which sets no permission.
\Zend\Navigation\Page\AbstractPagefluent interface, returns selfsetPrivilege(string | null $privilege) : \Zend\Navigation\Page\AbstractPage
stringnull[optional] ACL privilege to associate with this page. Default is null, which sets no privilege.
\Zend\Navigation\Page\AbstractPagefluent interface, returns selfsetRel(array | \Traversable $relations) : \Zend\Navigation\Page\AbstractPage
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.
array\Traversable[optional] an associative array of forward links to other pages
\Zend\Navigation\Exception\InvalidArgumentException |
if $relations is not an array or Traversable object |
|---|
\Zend\Navigation\Page\AbstractPagefluent interface, returns selfsetResource(string | \Zend\Permissions\Acl\Resource\ResourceInterface $resource) : \Zend\Navigation\Page\AbstractPage
string\Zend\Permissions\Acl\Resource\ResourceInterface[optional] resource to associate with page. Default is null, which sets no resource.
\Zend\Navigation\Exception\InvalidArgumentException |
if $resource is invalid |
|---|
\Zend\Navigation\Page\AbstractPagefluent interface, returns selfsetRev(array | \Traversable $relations) : \Zend\Navigation\Page\AbstractPage
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.
array\Traversable[optional] an associative array of reverse links to other pages
\Zend\Navigation\Exception\InvalidArgumentException |
if $relations it not an array or Traversable object |
|---|
\Zend\Navigation\Page\AbstractPagefluent interface, returns selfsetTarget(string | null $target) : \Zend\Navigation\Page\AbstractPage
stringnull[optional] target to set. Default is null, which sets no target.
\Zend\Navigation\Exception\InvalidArgumentException |
if target is not string or null |
|---|
\Zend\Navigation\Page\AbstractPagefluent interface, returns selfsetTextDomain(string | null $textDomain) : \Zend\Navigation\Page\AbstractPage
stringnull[optional] text domain to associate with this page. Default is null, which sets no text domain.
\Zend\Navigation\Page\AbstractPagefluent interface, returns selfsetTitle(string $title) : \Zend\Navigation\Page\AbstractPage
string[optional] page title. Default is null, which sets no title.
\Zend\Navigation\Exception\InvalidArgumentException |
if not given string or null |
|---|
\Zend\Navigation\Page\AbstractPagefluent interface, returns selfsetVisible(bool $visible) : \Zend\Navigation\Page\AbstractPage
bool[optional] whether page should be considered visible or not. Default is true.
\Zend\Navigation\Page\AbstractPagefluent interface, returns selftoArray() : array
arrayassociative array containing all page propertiesvalid() : bool
Implements RecursiveIterator interface.
| inherited_from | \Zend\Navigation\AbstractContainer::valid() |
|---|
boolinit() : void
normalizePropertyName(string $property) : string
stringproperty name to normalize
stringnormalized property namesort() : void
| inherited_from | \Zend\Navigation\AbstractContainer::sort() |
|---|
$active : bool
$class : string | null
$dirtyIndex : bool
| inherited_from | \Zend\Navigation\AbstractContainer::$$dirtyIndex |
|---|
$factories : array
$fragment : string | null
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)
| link | http://www.w3.org/TR/html401/intro/intro.html#fragment-uri |
|---|
$id : string | null
$index : array
| inherited_from | \Zend\Navigation\AbstractContainer::$$index |
|---|
$label : string | null
$order : int | null
$pages : array
| inherited_from | \Zend\Navigation\AbstractContainer::$$pages |
|---|
$privilege : string | null
$properties : array
$rel : array
$resource : string | \Zend\Permissions\Acl\Resource\ResourceInterface | null
$rev : array
$target : string | null
$textDomain : string
$title : string | null
$visible : bool