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 license@zend.com so we can send you a copy immediately.
Zend_Navigation_Container
Container class for Zend_Navigation_Page classes.
bool $_dirtyIndex = 'false'
Whether index is dirty and needs to be re-arranged
array $_index = 'array'
An index that contains the order in which to iterate pages
array $_pages = 'array'
Contains sub pages
__call(
string $method, array $arguments
)
:
Magic overload: Proxy calls to finder methods
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');
_sort(
)
:
void
Sorts the page index according to page order
addPage(
Zend_Navigation_Page|array|Zend_Config $page
)
:
Zend_Navigation_Container
Adds a page to the container
This method will inject the container as the given page's parent by calling {@link Zend_Navigation_Page::setParent()}.
addPages(
array|Zend_Config $pages
)
:
Zend_Navigation_Container
Adds several pages at once
count(
)
:
int
Returns number of pages in container
Implements Countable interface.
current(
)
:
Zend_Navigation_Page
Returns current page
Implements RecursiveIterator interface.
findAllBy(
string $property, mixed $value
)
:
array
Returns all child pages matching $property == $value, or an empty array if no pages are found
findBy(
string $property, mixed $value, bool $all
=
false
)
:
Zend_Navigation_Page|null
Returns page(s) matching $property == $value
findOneBy(
string $property, mixed $value
)
:
Zend_Navigation_Page|null
Returns a child page matching $property == $value, or null if not found
getChildren(
)
:
Zend_Navigation_Page|null
Returns the child container.
Implements RecursiveIterator interface.
getPages(
)
:
array
Returns pages in the container
hasChildren(
)
:
bool
Proxy to hasPages()
Implements RecursiveIterator interface.
hasPage(
Zend_Navigation_Page $page, bool $recursive
=
false
)
:
bool
Checks if the container has the given page
hasPages(
)
:
bool
Returns true if container contains any pages
key(
)
:
string
Returns hash code of current page
Implements RecursiveIterator interface.
next(
)
:
void
Moves index pointer to next page in the container
Implements RecursiveIterator interface.
notifyOrderUpdated(
)
:
void
Notifies container that the order of pages are updated
removePage(
Zend_Navigation_Page|int $page
)
:
bool
Removes the given page from the container
removePages(
)
:
Zend_Navigation_Container
Removes all pages in container
rewind(
)
:
void
Sets index pointer to first page in the container
Implements RecursiveIterator interface.
setPages(
array $pages
)
:
Zend_Navigation_Container
Sets pages this container should have, removing existing pages
toArray(
)
:
array
Returns an array representation of all pages in container
valid(
)
:
bool
Checks if container index is valid
Implements RecursiveIterator interface.