__call()
__construct()
addPage()
addPages()
count()
current()
findAllBy()
findBy()
findOneBy()
getChildren()
getPages()
hasChildren()
hasPage()
hasPages()
key()
next()
notifyOrderUpdated()
removePage()
removePages()
rewind()
setPages()
toArray()
valid()
sort()
$dirtyIndex
$index
$pages
A simple container class for {@link 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 $pages)
array\Traversable[optional] pages to add
\Zend\Navigation\Exception\InvalidArgumentException |
if $pages is invalid |
|---|
addPage(\Zend\Navigation\Page\AbstractPage | array | \Traversable $page) : \Zend\Navigation\AbstractContainer
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\AbstractContainerfluent interface, returns selfaddPages(array | \Traversable | \Zend\Navigation\AbstractContainer $pages) : \Zend\Navigation\AbstractContainer
| inherited_from | \Zend\Navigation\AbstractContainer::addPages() |
|---|
\Zend\Navigation\Exception\InvalidArgumentException |
if $pages is not array, Traversable or AbstractContainer |
|---|
\Zend\Navigation\AbstractContainerfluent 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 nullfindAllBy(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 nullgetChildren() : \Zend\Navigation\Page\AbstractPage | null
Implements RecursiveIterator interface.
| inherited_from | \Zend\Navigation\AbstractContainer::getChildren() |
|---|
getPages() : array
| inherited_from | \Zend\Navigation\AbstractContainer::getPages() |
|---|
arrayarray of Page\AbstractPage instanceshasChildren() : 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
| inherited_from | \Zend\Navigation\AbstractContainer::hasPages() |
|---|
boolwhether container has any pageskey() : 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
| inherited_from | \Zend\Navigation\AbstractContainer::removePage() |
|---|
\Zend\Navigation\Page\AbstractPageintpage to remove, either a page instance or a specific page order
boolwhether the removal was successfulremovePages() : \Zend\Navigation\AbstractContainer
| inherited_from | \Zend\Navigation\AbstractContainer::removePages() |
|---|
\Zend\Navigation\AbstractContainerfluent interface, returns selfrewind() : void
Implements RecursiveIterator interface.
| inherited_from | \Zend\Navigation\AbstractContainer::rewind() |
|---|
setPages(array $pages) : \Zend\Navigation\AbstractContainer
| inherited_from | \Zend\Navigation\AbstractContainer::setPages() |
|---|
arraypages to set
\Zend\Navigation\AbstractContainerfluent interface, returns selftoArray() : array
| inherited_from | \Zend\Navigation\AbstractContainer::toArray() |
|---|
arrayvalid() : bool
Implements RecursiveIterator interface.
| inherited_from | \Zend\Navigation\AbstractContainer::valid() |
|---|
boolsort() : void
| inherited_from | \Zend\Navigation\AbstractContainer::sort() |
|---|
$dirtyIndex : bool
| inherited_from | \Zend\Navigation\AbstractContainer::$$dirtyIndex |
|---|
$index : array
| inherited_from | \Zend\Navigation\AbstractContainer::$$index |
|---|
$pages : array
| inherited_from | \Zend\Navigation\AbstractContainer::$$pages |
|---|