fix php 5.6 in docker dev env (#1740)
[openemr.git] / vendor / zendframework / zend-navigation / doc / book / intro.md
blob514a1d832505678644d9974f2de5a4a7b608b0d6
1 # Introduction
3 zend-navigation manages trees of pointers to web pages. Simply put: It can be
4 used for creating menus, breadcrumbs, links, and sitemaps, or serve as a model
5 for other navigation related purposes.
7 ## Pages and Containers
9 There are two main concepts in zend-navigation: pages and containers.
11 ### Pages
13 A page (`Zend\Navigation\AbstractPage`) in zend-navigation, in its most basic
14 form, is an object that holds a pointer to a web page. In addition to the
15 pointer itself, the page object contains a number of other properties that are
16 typically relevant for navigation, such as `label`, `title`, etc.
18 Read more about pages in the [pages](pages.md) section.
20 ### Containers
22 A navigation container (`Zend\Navigation\AbstractContainer`) holds pages. It has
23 methods for adding, retrieving, deleting and iterating pages. It implements the
24 [SPL](http://php.net/spl) interfaces `RecursiveIterator` and `Countable`, and
25 can thus be iterated with SPL iterators such as `RecursiveIteratorIterator`.
27 Read more about containers in the [containers](containers.md) section.
29 > ### Pages are containers
31 > `Zend\Navigation\AbstractPage` extends `Zend\Navigation\AbstractContainer`,
32 > which means that a page can have sub pages.
34 ## View Helpers
36 ### Separation of data (model) and rendering (view)
38 Classes in the zend-navigation namespace do not deal with rendering of
39 navigational elements.  Rendering is done with navigational view helpers.
40 However, pages contain information that is used by view helpers when rendering,
41 such as `label`, `class` (CSS), `title`, `lastmod`, and `priority` properties
42 for sitemaps, etc.
44 Read more about rendering navigational elements in the
45 [view helpers](helpers/intro.md) section.