Zend_Navigation_Container
Container class for Zend_Navigation_Page classes.
category | Zend |
---|---|
package | Zend_Navigation |
copyright | Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com) |
license | New BSD License |
__call(string $method, array $arguments) : mixed
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');
string
method name
array
method arguments
\Zend_Navigation_Exception |
if method does not exist |
---|
mixed
Zend_Navigation|array|null matching page, array of pages
or nulladdPage(\Zend_Navigation_Page|array|\Zend_Config $page) : \Zend_Navigation_Container
This method will inject the container as the given page's parent by calling Zend_Navigation_Page::setParent().
\Zend_Navigation_Page
array
\Zend_Config
page to add
\Zend_Navigation_Exception |
if page is invalid |
---|
\Zend_Navigation_Container
fluent interface,
returns selfaddPages(array<mixed,\Zend_Navigation_Page>|\Zend_Config|\Zend_Navigation_Container $pages) : \Zend_Navigation_Container
array<mixed,\Zend_Navigation_Page>
\Zend_Config
\Zend_Navigation_Container
pages to add
\Zend_Navigation_Exception |
if $pages is not array, Zend_Config or Zend_Navigation_Container |
---|
\Zend_Navigation_Container
fluent interface,
returns selfcount() : integer
Implements Countable interface.
integer
number of pages in the containercurrent() : \Zend_Navigation_Page
Implements RecursiveIterator interface.
\Zend_Navigation_Exception |
if the index is invalid |
---|
\Zend_Navigation_Page
current page or nullfindAllBy(string $property, mixed $value, boolean $useRegex = false
) : array<mixed,\Zend_Navigation_Page>
string
name of property to match against
mixed
value to match property against
boolean
[optional] if true PHP's preg_match is used. Default is false.
array<mixed,\Zend_Navigation_Page>
array containing only Zend_Navigation_Page
instancesfindBy(string $property, mixed $value, boolean $all= false
, boolean $useRegex= false
) : \Zend_Navigation_Page | null
string
name of property to match against
mixed
value to match property against
boolean
[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.
boolean
[optional] if true PHP's preg_match is used. Default is false.
\Zend_Navigation_Page
null
matching page or nullfindOneBy(string $property, mixed $value, boolean $useRegex = false
) : \Zend_Navigation_Page | null
string
name of property to match against
mixed
value to match property against
boolean
[optional] if true PHP's preg_match is used. Default is false.
\Zend_Navigation_Page
null
matching page or nullgetChildren() : \Zend_Navigation_Page | null
Implements RecursiveIterator interface.
\Zend_Navigation_Page
null
getPages() : array<mixed,\Zend_Navigation_Page>
array<mixed,\Zend_Navigation_Page>
array of Zend_Navigation_Page instanceshasChildren() : boolean
Implements RecursiveIterator interface.
boolean
whether container has any pageshasPage(\Zend_Navigation_Page $page, boolean $recursive = false
) : boolean
\Zend_Navigation_Page
page to look for
boolean
[optional] whether to search recursively. Default is false.
boolean
whether page is in containerhasPages() : boolean
boolean
whether container has any pageskey() : string
Implements RecursiveIterator interface.
string
hash code of current pagenext() : void
Implements RecursiveIterator interface.
notifyOrderUpdated() : void
removePage(\Zend_Navigation_Page|integer $page, boolean $recursive = false
) : boolean
\Zend_Navigation_Page
integer
page to remove, either a page instance or a specific page order
boolean
[optional] whether to remove recursively
boolean
whether the removal was successfulremovePages() : \Zend_Navigation_Container
\Zend_Navigation_Container
fluent interface, returns selfrewind() : void
Implements RecursiveIterator interface.
setPages(array<mixed,\Zend_Navigation_Page> $pages) : \Zend_Navigation_Container
array<mixed,\Zend_Navigation_Page>
pages to set
\Zend_Navigation_Container
fluent interface, returns selftoArray() : array<mixed,\Zend_Navigation_Page>
array<mixed,\Zend_Navigation_Page>
valid() : boolean
Implements RecursiveIterator interface.
boolean
_sort() : void
$_dirtyIndex : boolean
false
$_index : array
array()
$_pages : array<mixed,\Zend_Navigation_Page>
array()