Zend_Navigation-Introduction.xml 3.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!-- Reviewed: no -->
  3. <sect1 id="zend.navigation.introduction">
  4. <title>Introduction</title>
  5. <para>
  6. <classname>Zend_Navigation</classname> is a component for managing
  7. trees of pointers to web pages.
  8. Simply put: It can be used for creating menus, breadcrumbs, links, and
  9. sitemaps, or serve as a model for other navigation related purposes.
  10. </para>
  11. <sect2 id="zend.navigation.introduction.concepts">
  12. <title>Pages and Containers</title>
  13. <para>
  14. There are two main concepts in <classname>Zend_Navigation</classname>:
  15. </para>
  16. <sect3 id="zend.navigation.introduction.pages">
  17. <title>Pages</title>
  18. <para>
  19. A page (<classname>Zend_Navigation_Page</classname>) in
  20. <classname>Zend_Navigation</classname> –
  21. in its most basic form – is an object that holds a pointer
  22. to a web page. In addition to the pointer itself, the page
  23. object contains a number of other properties that are
  24. typically relevant for navigation, such as <property>label</property>,
  25. <property>title</property>, etc.
  26. </para>
  27. <para>
  28. Read more about pages in the
  29. <link linkend="zend.navigation.pages">pages</link>
  30. section.
  31. </para>
  32. </sect3>
  33. <sect3 id="zend.navigation.introduction.containers">
  34. <title>Containers</title>
  35. <para>
  36. A navigation container
  37. (<classname>Zend_Navigation_Container</classname>) is a
  38. container class for pages. It has methods for
  39. adding, retrieving, deleting and iterating pages.
  40. It implements the <ulink url="http://php.net/spl">SPL</ulink>
  41. interfaces <classname>RecursiveIterator</classname> and
  42. <classname>Countable</classname>, and can thus be iterated
  43. with SPL iterators such as
  44. <classname>RecursiveIteratorIterator</classname>.
  45. </para>
  46. <para>
  47. Read more about containers in the
  48. <link linkend="zend.navigation.containers">containers</link>
  49. section.
  50. </para>
  51. <note>
  52. <para>
  53. <classname>Zend_Navigation_Page</classname> extends
  54. <classname>Zend_Navigation_Container</classname>, which
  55. means that a page can have sub pages.
  56. </para>
  57. </note>
  58. </sect3>
  59. </sect2>
  60. <sect2 id="zend.navigation.introduction.separation">
  61. <title>Separation of data (model) and rendering (view)</title>
  62. <para>
  63. Classes in the <classname>Zend_Navigation</classname>
  64. namespace do not deal with rendering of navigational elements.
  65. Rendering is done with navigational view helpers. However,
  66. pages contain information that is used by view helpers
  67. when rendering, such as; <property>label</property>, <acronym>CSS</acronym> class,
  68. <property>title</property>, <property>lastmod</property> and
  69. <property>priority</property> properties for sitemaps, etc.
  70. </para>
  71. <para>
  72. Read more about rendering navigational elements in
  73. the manual section on
  74. <link linkend="zend.view.helpers.initial.navigation">navigation
  75. helpers</link>.
  76. </para>
  77. </sect2>
  78. </sect1>