Zend Framework  3.0
Public Member Functions | List of all members
Navigation Class Reference

A simple container class for Zend pages. More...

Public Member Functions

 __construct ($pages=null)
 Creates a new navigation container.
 
- Public Member Functions inherited from AbstractContainer
 notifyOrderUpdated ()
 Notifies container that the order of pages are updated.
 
 addPage ($page)
 Adds a page to the container.
 
 addPages ($pages)
 Adds several pages at once.
 
 setPages (array $pages)
 Sets pages this container should have, removing existing pages.
 
 getPages ()
 Returns pages in the container.
 
 removePages ()
 Removes all pages in container.
 
 hasPage (Page\AbstractPage $page, $recursive=false)
 Checks if the container has the given page.
 
 hasPages ($onlyVisible=false)
 Returns true if container contains any pages.
 
 findOneBy ($property, $value)
 Returns a child page matching $property == $value, or null if not found.
 
 findAllBy ($property, $value)
 Returns all child pages matching $property == $value, or an empty array if no pages are found.
 
 findBy ($property, $value, $all=false)
 Returns page(s) matching $property == $value.
 
 __call ($method, $arguments)
 Magic overload: Proxy calls to finder methods.
 
 toArray ()
 Returns an array representation of all pages in container.
 
 current ()
 Returns current page.
 
 key ()
 Returns hash code of current page.
 
 next ()
 Moves index pointer to next page in the container.
 
 rewind ()
 Sets index pointer to first page in the container.
 
 valid ()
 Checks if container index is valid.
 
 hasChildren ()
 Proxy to hasPages()
 
 getChildren ()
 Returns the child container.
 
 count ()
 Returns number of pages in container.
 

Additional Inherited Members

- Protected Member Functions inherited from AbstractContainer
 sort ()
 Sorts the page index according to page order.
 
- Protected Attributes inherited from AbstractContainer
 $pages = []
 
 $index = []
 
 $dirtyIndex = false
 

Detailed Description

A simple container class for Zend pages.

Constructor & Destructor Documentation

__construct (   $pages = null)

Creates a new navigation container.

Parameters
array | Traversable$pages[optional] pages to add
Exceptions
Exception\InvalidArgumentExceptionif $pages is invalid