Zend_Navigation-Containers.xml 25 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!-- Reviewed: no -->
  3. <sect1 id="zend.navigation.containers">
  4. <title>Containers</title>
  5. <para>
  6. Containers have methods for adding, retrieving, deleting and
  7. iterating pages. Containers implement the
  8. <ulink url="http://php.net/spl">SPL</ulink> interfaces
  9. <classname>RecursiveIterator</classname> and
  10. <classname>Countable</classname>, meaning that a container can
  11. be iterated using the SPL
  12. <classname>RecursiveIteratorIterator</classname> class.
  13. </para>
  14. <sect2 id="zend.navigation.containers.creating">
  15. <title>Creating containers</title>
  16. <para>
  17. <classname>Zend_Navigation_Container</classname> is
  18. abstract, and can not be instantiated directly. Use
  19. <classname>Zend_Navigation</classname> if you want to
  20. instantiate a container.
  21. </para>
  22. <para>
  23. <classname>Zend_Navigation</classname> can be constructed
  24. entirely empty, or take an array or a
  25. <classname>Zend_Config</classname> object with pages to put in the
  26. container. Each page in the given array/config will eventually be
  27. passed to the <methodname>addPage()</methodname> method of the container class,
  28. which means that each element in the array/config can be an array or
  29. a config object, or a <classname>Zend_Navigation_Page</classname>
  30. instance.
  31. </para>
  32. <example id="zend.navigation.containers.creating.example.array">
  33. <title>Creating a container using an array</title>
  34. <programlisting language="php"><![CDATA[
  35. /*
  36. * Create a container from an array
  37. *
  38. * Each element in the array will be passed to
  39. * Zend_Navigation_Page::factory() when constructing.
  40. */
  41. $container = new Zend_Navigation(array(
  42. array(
  43. 'label' => 'Page 1',
  44. 'id' => 'home-link',
  45. 'uri' => '/'
  46. ),
  47. array(
  48. 'label' => 'Zend',
  49. 'uri' => 'http://www.zend-project.com/',
  50. 'order' => 100
  51. ),
  52. array(
  53. 'label' => 'Page 2',
  54. 'controller' => 'page2',
  55. 'pages' => array(
  56. array(
  57. 'label' => 'Page 2.1',
  58. 'action' => 'page2_1',
  59. 'controller' => 'page2',
  60. 'class' => 'special-one',
  61. 'title' => 'This element has a special class',
  62. 'active' => true
  63. ),
  64. array(
  65. 'label' => 'Page 2.2',
  66. 'action' => 'page2_2',
  67. 'controller' => 'page2',
  68. 'class' => 'special-two',
  69. 'title' => 'This element has a special class too'
  70. )
  71. )
  72. ),
  73. array(
  74. 'label' => 'Page 2 with params',
  75. 'action' => 'index',
  76. 'controller' => 'page2',
  77. // specify a param or two
  78. 'params' => array(
  79. 'format' => 'json',
  80. 'foo' => 'bar'
  81. )
  82. ),
  83. array(
  84. 'label' => 'Page 2 with params and a route',
  85. 'action' => 'index',
  86. 'controller' => 'page2',
  87. // specify a route name and a param for the route
  88. 'route' => 'nav-route-example',
  89. 'params' => array(
  90. 'format' => 'json'
  91. )
  92. ),
  93. array(
  94. 'label' => 'Page 3',
  95. 'action' => 'index',
  96. 'controller' => 'index',
  97. 'module' => 'mymodule',
  98. 'reset_params' => false
  99. ),
  100. array(
  101. 'label' => 'Page 4',
  102. 'uri' => '#',
  103. 'pages' => array(
  104. array(
  105. 'label' => 'Page 4.1',
  106. 'uri' => '/page4',
  107. 'title' => 'Page 4 using uri',
  108. 'pages' => array(
  109. array(
  110. 'label' => 'Page 4.1.1',
  111. 'title' => 'Page 4 using mvc params',
  112. 'action' => 'index',
  113. 'controller' => 'page4',
  114. // let's say this page is active
  115. 'active' => '1'
  116. )
  117. )
  118. )
  119. )
  120. ),
  121. array(
  122. 'label' => 'Page 0?',
  123. 'uri' => '/setting/the/order/option',
  124. // setting order to -1 should make it appear first
  125. 'order' => -1
  126. ),
  127. array(
  128. 'label' => 'Page 5',
  129. 'uri' => '/',
  130. // this page should not be visible
  131. 'visible' => false,
  132. 'pages' => array(
  133. array(
  134. 'label' => 'Page 5.1',
  135. 'uri' => '#',
  136. 'pages' => array(
  137. array(
  138. 'label' => 'Page 5.1.1',
  139. 'uri' => '#',
  140. 'pages' => array(
  141. array(
  142. 'label' => 'Page 5.1.2',
  143. 'uri' => '#',
  144. // let's say this page is active
  145. 'active' => true
  146. )
  147. )
  148. )
  149. )
  150. )
  151. )
  152. ),
  153. array(
  154. 'label' => 'ACL page 1 (guest)',
  155. 'uri' => '#acl-guest',
  156. 'resource' => 'nav-guest',
  157. 'pages' => array(
  158. array(
  159. 'label' => 'ACL page 1.1 (foo)',
  160. 'uri' => '#acl-foo',
  161. 'resource' => 'nav-foo'
  162. ),
  163. array(
  164. 'label' => 'ACL page 1.2 (bar)',
  165. 'uri' => '#acl-bar',
  166. 'resource' => 'nav-bar'
  167. ),
  168. array(
  169. 'label' => 'ACL page 1.3 (baz)',
  170. 'uri' => '#acl-baz',
  171. 'resource' => 'nav-baz'
  172. ),
  173. array(
  174. 'label' => 'ACL page 1.4 (bat)',
  175. 'uri' => '#acl-bat',
  176. 'resource' => 'nav-bat'
  177. )
  178. )
  179. ),
  180. array(
  181. 'label' => 'ACL page 2 (member)',
  182. 'uri' => '#acl-member',
  183. 'resource' => 'nav-member'
  184. ),
  185. array(
  186. 'label' => 'ACL page 3 (admin',
  187. 'uri' => '#acl-admin',
  188. 'resource' => 'nav-admin',
  189. 'pages' => array(
  190. array(
  191. 'label' => 'ACL page 3.1 (nothing)',
  192. 'uri' => '#acl-nada'
  193. )
  194. )
  195. ),
  196. array(
  197. 'label' => 'Zend Framework',
  198. 'route' => 'zf-route'
  199. )
  200. ));
  201. ]]></programlisting>
  202. </example>
  203. <example id="zend.navigation.containers.creating.example.config">
  204. <title>Creating a container using a config object</title>
  205. <programlisting language="php"><![CDATA[
  206. /* CONTENTS OF /path/to/navigation.xml:
  207. <?xml version="1.0" encoding="UTF-8"?>
  208. <config>
  209. <nav>
  210. <zend>
  211. <label>Zend</label>
  212. <uri>http://www.zend-project.com/</uri>
  213. <order>100</order>
  214. </zend>
  215. <page1>
  216. <label>Page 1</label>
  217. <uri>page1</uri>
  218. <pages>
  219. <page1_1>
  220. <label>Page 1.1</label>
  221. <uri>page1/page1_1</uri>
  222. </page1_1>
  223. </pages>
  224. </page1>
  225. <page2>
  226. <label>Page 2</label>
  227. <uri>page2</uri>
  228. <pages>
  229. <page2_1>
  230. <label>Page 2.1</label>
  231. <uri>page2/page2_1</uri>
  232. </page2_1>
  233. <page2_2>
  234. <label>Page 2.2</label>
  235. <uri>page2/page2_2</uri>
  236. <pages>
  237. <page2_2_1>
  238. <label>Page 2.2.1</label>
  239. <uri>page2/page2_2/page2_2_1</uri>
  240. </page2_2_1>
  241. <page2_2_2>
  242. <label>Page 2.2.2</label>
  243. <uri>page2/page2_2/page2_2_2</uri>
  244. <active>1</active>
  245. </page2_2_2>
  246. </pages>
  247. </page2_2>
  248. <page2_3>
  249. <label>Page 2.3</label>
  250. <uri>page2/page2_3</uri>
  251. <pages>
  252. <page2_3_1>
  253. <label>Page 2.3.1</label>
  254. <uri>page2/page2_3/page2_3_1</uri>
  255. </page2_3_1>
  256. <page2_3_2>
  257. <label>Page 2.3.2</label>
  258. <uri>page2/page2_3/page2_3_2</uri>
  259. <visible>0</visible>
  260. <pages>
  261. <page2_3_2_1>
  262. <label>Page 2.3.2.1</label>
  263. <uri>page2/page2_3/page2_3_2/1</uri>
  264. <active>1</active>
  265. </page2_3_2_1>
  266. <page2_3_2_2>
  267. <label>Page 2.3.2.2</label>
  268. <uri>page2/page2_3/page2_3_2/2</uri>
  269. <active>1</active>
  270. <pages>
  271. <page_2_3_2_2_1>
  272. <label>Ignore</label>
  273. <uri>#</uri>
  274. <active>1</active>
  275. </page_2_3_2_2_1>
  276. </pages>
  277. </page2_3_2_2>
  278. </pages>
  279. </page2_3_2>
  280. <page2_3_3>
  281. <label>Page 2.3.3</label>
  282. <uri>page2/page2_3/page2_3_3</uri>
  283. <resource>admin</resource>
  284. <pages>
  285. <page2_3_3_1>
  286. <label>Page 2.3.3.1</label>
  287. <uri>page2/page2_3/page2_3_3/1</uri>
  288. <active>1</active>
  289. </page2_3_3_1>
  290. <page2_3_3_2>
  291. <label>Page 2.3.3.2</label>
  292. <uri>page2/page2_3/page2_3_3/2</uri>
  293. <resource>guest</resource>
  294. <active>1</active>
  295. </page2_3_3_2>
  296. </pages>
  297. </page2_3_3>
  298. </pages>
  299. </page2_3>
  300. </pages>
  301. </page2>
  302. <page3>
  303. <label>Page 3</label>
  304. <uri>page3</uri>
  305. <pages>
  306. <page3_1>
  307. <label>Page 3.1</label>
  308. <uri>page3/page3_1</uri>
  309. <resource>guest</resource>
  310. </page3_1>
  311. <page3_2>
  312. <label>Page 3.2</label>
  313. <uri>page3/page3_2</uri>
  314. <resource>member</resource>
  315. <pages>
  316. <page3_2_1>
  317. <label>Page 3.2.1</label>
  318. <uri>page3/page3_2/page3_2_1</uri>
  319. </page3_2_1>
  320. <page3_2_2>
  321. <label>Page 3.2.2</label>
  322. <uri>page3/page3_2/page3_2_2</uri>
  323. <resource>admin</resource>
  324. </page3_2_2>
  325. </pages>
  326. </page3_2>
  327. <page3_3>
  328. <label>Page 3.3</label>
  329. <uri>page3/page3_3</uri>
  330. <resource>special</resource>
  331. <pages>
  332. <page3_3_1>
  333. <label>Page 3.3.1</label>
  334. <uri>page3/page3_3/page3_3_1</uri>
  335. <visible>0</visible>
  336. </page3_3_1>
  337. <page3_3_2>
  338. <label>Page 3.3.2</label>
  339. <uri>page3/page3_3/page3_3_2</uri>
  340. <resource>admin</resource>
  341. </page3_3_2>
  342. </pages>
  343. </page3_3>
  344. </pages>
  345. </page3>
  346. <home>
  347. <label>Home</label>
  348. <order>-100</order>
  349. <module>default</module>
  350. <controller>index</controller>
  351. <action>index</action>
  352. </home>
  353. </nav>
  354. </config>
  355. */
  356. $config = new Zend_Config_Xml('/path/to/navigation.xml', 'nav');
  357. $container = new Zend_Navigation($config);
  358. ]]></programlisting>
  359. </example>
  360. </sect2>
  361. <sect2 id="zend.navigation.containers.adding">
  362. <title>Adding pages</title>
  363. <para>
  364. Adding pages to a container can be done with the methods
  365. <methodname>addPage()</methodname>, <methodname>addPages()</methodname>, or
  366. <methodname>setPages()</methodname>. See examples below for explanation.
  367. </para>
  368. <example id="zend.navigation.containers.adding.example">
  369. <title>Adding pages to a container</title>
  370. <programlisting language="php"><![CDATA[
  371. // create container
  372. $container = new Zend_Navigation();
  373. // add page by giving a page instance
  374. $container->addPage(Zend_Navigation_Page::factory(array(
  375. 'uri' => 'http://www.example.com/'
  376. )))
  377. // add page by giving an array
  378. $container->addPage(array(
  379. 'uri' => 'http://www.example.com/'
  380. )))
  381. // add page by giving a config object
  382. $container->addPage(new Zend_Config(array(
  383. 'uri' => 'http://www.example.com/'
  384. )))
  385. $pages = array(
  386. array(
  387. 'label' => 'Save'
  388. 'action' => 'save',
  389. ),
  390. array(
  391. 'label' => 'Delete',
  392. 'action' => 'delete'
  393. )
  394. );
  395. // add two pages
  396. $container->addPages($pages);
  397. // remove existing pages and add the given pages
  398. $container->setPages($pages);
  399. ]]></programlisting>
  400. </example>
  401. </sect2>
  402. <sect2 id="zend.navigation.containers.removing">
  403. <title>Removing pages</title>
  404. <para>
  405. Removing pages can be done with <methodname>removePage()</methodname> or
  406. <methodname>removePages()</methodname>. The first method accepts a an instance
  407. of a page, or an integer. The integer corresponds to the
  408. <property>order</property> a page has. The latter method will remove all
  409. pages in the container.
  410. </para>
  411. <example id="zend.navigation.containers.removing.example">
  412. <title>Removing pages from a container</title>
  413. <programlisting language="php"><![CDATA[
  414. $container = new Zend_Navigation(array(
  415. array(
  416. 'label' => 'Page 1',
  417. 'action' => 'page1'
  418. ),
  419. array(
  420. 'label' => 'Page 2',
  421. 'action' => 'page2',
  422. 'order' => 200
  423. ),
  424. array(
  425. 'label' => 'Page 3',
  426. 'action' => 'page3'
  427. )
  428. ));
  429. // remove page by implicit page order
  430. $container->removePage(0); // removes Page 1
  431. // remove page by instance
  432. $page3 = $container->findOneByAction('page3');
  433. $container->removePage($page3); // removes Page 3
  434. // remove page by explicit page order
  435. $container->removePage(200); // removes Page 2
  436. // remove all pages
  437. $container->removePages(); // removes all pages
  438. ]]></programlisting>
  439. </example>
  440. </sect2>
  441. <sect2 id="zend.navigation.containers.finding">
  442. <title>Finding pages</title>
  443. <para>
  444. Containers have finder methods for retrieving pages.
  445. They are <methodname>findOneBy($property, $value)</methodname>,
  446. <methodname>findAllBy($property, $value)</methodname>, and
  447. <methodname>findBy($property, $value, $all = false)</methodname>.
  448. Those methods will recursively search the container for
  449. pages matching the given <command>$page->$property == $value</command>.
  450. The first method, <methodname>findOneBy()</methodname>, will return a
  451. single page matching the property with the given value, or
  452. <constant>NULL</constant> if it cannot be found. The second method will return
  453. all pages with a property matching the given value. The third
  454. method will call one of the two former methods depending on the
  455. <varname>$all</varname> flag.
  456. </para>
  457. <para>
  458. The finder methods can also be used magically by appending the
  459. property name to <property>findBy</property>, <property>findOneBy</property>, or
  460. <property>findAllBy</property>, e.g. <methodname>findOneByLabel('Home')</methodname> to
  461. return the first matching page with label 'Home'.
  462. Other combinations are <methodname>findByLabel(...)</methodname>,
  463. <methodname>findOnyByTitle(...)</methodname>,
  464. <methodname>findAllByController(...)</methodname>, etc. Finder
  465. methods also work on custom properties, such as
  466. <methodname>findByFoo('bar')</methodname>.
  467. </para>
  468. <example id="zend.navigation.containers.finding.example">
  469. <title>Finding pages in a container</title>
  470. <programlisting language="php"><![CDATA[
  471. $container = new Zend_Navigation(array(
  472. array(
  473. 'label' => 'Page 1',
  474. 'uri' => 'page-1',
  475. 'foo' => 'bar',
  476. 'pages' => array(
  477. array(
  478. 'label' => 'Page 1.1',
  479. 'uri' => 'page-1.1',
  480. 'foo' => 'bar',
  481. ),
  482. array(
  483. 'label' => 'Page 1.2',
  484. 'uri' => 'page-1.2',
  485. 'class' => 'my-class',
  486. ),
  487. array(
  488. 'type' => 'uri',
  489. 'label' => 'Page 1.3',
  490. 'uri' => 'page-1.3',
  491. 'action' => 'about'
  492. )
  493. )
  494. ),
  495. array(
  496. 'label' => 'Page 2',
  497. 'id' => 'page_2_and_3',
  498. 'class' => 'my-class',
  499. 'module' => 'page2',
  500. 'controller' => 'index',
  501. 'action' => 'page1'
  502. ),
  503. array(
  504. 'label' => 'Page 3',
  505. 'id' => 'page_2_and_3',
  506. 'module' => 'page3',
  507. 'controller' => 'index'
  508. )
  509. ));
  510. // The 'id' is not required to be unique, but be aware that
  511. // having two pages with the same id will render the same id attribute
  512. // in menus and breadcrumbs.
  513. $found = $container->findBy('id',
  514. 'page_2_and_3'); // returns Page 2
  515. $found = $container->findOneBy('id',
  516. 'page_2_and_3'); // returns Page 2
  517. $found = $container->findBy('id',
  518. 'page_2_and_3',
  519. true); // returns Page 2 and Page 3
  520. $found = $container->findById('page_2_and_3'); // returns Page 2
  521. $found = $container->findOneById('page_2_and_3'); // returns Page 2
  522. $found = $container->findAllById('page_2_and_3'); // returns Page 2 and Page 3
  523. // Find all matching CSS class my-class
  524. $found = $container->findAllBy('class',
  525. 'my-class'); // returns Page 1.2 and Page 2
  526. $found = $container->findAllByClass('my-class'); // returns Page 1.2 and Page 2
  527. // Find first matching CSS class my-class
  528. $found = $container->findOneByClass('my-class'); // returns Page 1.2
  529. // Find all matching CSS class non-existant
  530. $found = $container->findAllByClass('non-existant'); // returns array()
  531. // Find first matching CSS class non-existant
  532. $found = $container->findOneByClass('non-existant'); // returns null
  533. // Find all pages with custom property 'foo' = 'bar'
  534. $found = $container->findAllBy('foo', 'bar'); // returns Page 1 and Page 1.1
  535. // To achieve the same magically, 'foo' must be in lowercase.
  536. // This is because 'foo' is a custom property, and thus the
  537. // property name is not normalized to 'Foo'
  538. $found = $container->findAllByfoo('bar');
  539. // Find all with controller = 'index'
  540. $found = $container->findAllByController('index'); // returns Page 2 and Page 3
  541. ]]></programlisting>
  542. </example>
  543. </sect2>
  544. <sect2 id="zend.navigation.containers.iterating">
  545. <title>Iterating containers</title>
  546. <para>
  547. <classname>Zend_Navigation_Container</classname> implements
  548. <classname>RecursiveIteratorIterator</classname>, and can be
  549. iterated using any <classname>Iterator</classname> class. To iterate
  550. a container recursively, use the
  551. <classname>RecursiveIteratorIterator</classname> class.
  552. </para>
  553. <example id="zend.navigation.containers.iterating.example">
  554. <title>Iterating a container</title>
  555. <programlisting language="php"><![CDATA[
  556. /*
  557. * Create a container from an array
  558. */
  559. $container = new Zend_Navigation(array(
  560. array(
  561. 'label' => 'Page 1',
  562. 'uri' => '#'
  563. ),
  564. array(
  565. 'label' => 'Page 2',
  566. 'uri' => '#',
  567. 'pages' => array(
  568. array(
  569. 'label' => 'Page 2.1',
  570. 'uri' => '#'
  571. ),
  572. array(
  573. 'label' => 'Page 2.2',
  574. 'uri' => '#'
  575. )
  576. )
  577. ),
  578. array(
  579. 'label' => 'Page 3',
  580. 'uri' => '#'
  581. )
  582. ));
  583. // Iterate flat using regular foreach:
  584. // Output: Page 1, Page 2, Page 3
  585. foreach ($container as $page) {
  586. echo $page->label;
  587. }
  588. // Iterate recursively using RecursiveIteratorIterator
  589. $it = new RecursiveIteratorIterator(
  590. $container, RecursiveIteratorIterator::SELF_FIRST);
  591. // Output: Page 1, Page 2, Page 2.1, Page 2.2, Page 3
  592. foreach ($it as $page) {
  593. echo $page->label;
  594. }
  595. ]]></programlisting>
  596. </example>
  597. </sect2>
  598. <sect2 id="zend.navigation.containers.other">
  599. <title>Other operations</title>
  600. <para>
  601. The method <methodname>hasPage(Zend_Navigation_Page $page)</methodname> checks
  602. if the container has the given page. The method <methodname>hasPages()</methodname>
  603. checks if there are any pages in the container, and is equivalent
  604. to <command>count($container) > 1</command>.
  605. </para>
  606. <para>
  607. The <methodname>toArray()</methodname> method converts the container and the
  608. pages in it to an array. This can be useful for serializing and
  609. debugging.
  610. </para>
  611. <example id="zend.navigation.containers.other.example.toarray">
  612. <title>Converting a container to an array</title>
  613. <programlisting language="php"><![CDATA[
  614. $container = new Zend_Navigation(array(
  615. array(
  616. 'label' => 'Page 1',
  617. 'uri' => '#'
  618. ),
  619. array(
  620. 'label' => 'Page 2',
  621. 'uri' => '#',
  622. 'pages' => array(
  623. array(
  624. 'label' => 'Page 2.1',
  625. 'uri' => '#'
  626. ),
  627. array(
  628. 'label' => 'Page 2.2',
  629. 'uri' => '#'
  630. )
  631. )
  632. )
  633. ));
  634. var_dump($container->toArray());
  635. /* Output:
  636. array(2) {
  637. [0]=> array(15) {
  638. ["label"]=> string(6) "Page 1"
  639. ["id"]=> NULL
  640. ["class"]=> NULL
  641. ["title"]=> NULL
  642. ["target"]=> NULL
  643. ["rel"]=> array(0) {
  644. }
  645. ["rev"]=> array(0) {
  646. }
  647. ["order"]=> NULL
  648. ["resource"]=> NULL
  649. ["privilege"]=> NULL
  650. ["active"]=> bool(false)
  651. ["visible"]=> bool(true)
  652. ["type"]=> string(23) "Zend_Navigation_Page_Uri"
  653. ["pages"]=> array(0) {
  654. }
  655. ["uri"]=> string(1) "#"
  656. }
  657. [1]=> array(15) {
  658. ["label"]=> string(6) "Page 2"
  659. ["id"]=> NULL
  660. ["class"]=> NULL
  661. ["title"]=> NULL
  662. ["target"]=> NULL
  663. ["rel"]=> array(0) {
  664. }
  665. ["rev"]=> array(0) {
  666. }
  667. ["order"]=> NULL
  668. ["resource"]=> NULL
  669. ["privilege"]=> NULL
  670. ["active"]=> bool(false)
  671. ["visible"]=> bool(true)
  672. ["type"]=> string(23) "Zend_Navigation_Page_Uri"
  673. ["pages"]=> array(2) {
  674. [0]=> array(15) {
  675. ["label"]=> string(8) "Page 2.1"
  676. ["id"]=> NULL
  677. ["class"]=> NULL
  678. ["title"]=> NULL
  679. ["target"]=> NULL
  680. ["rel"]=> array(0) {
  681. }
  682. ["rev"]=> array(0) {
  683. }
  684. ["order"]=> NULL
  685. ["resource"]=> NULL
  686. ["privilege"]=> NULL
  687. ["active"]=> bool(false)
  688. ["visible"]=> bool(true)
  689. ["type"]=> string(23) "Zend_Navigation_Page_Uri"
  690. ["pages"]=> array(0) {
  691. }
  692. ["uri"]=> string(1) "#"
  693. }
  694. [1]=>
  695. array(15) {
  696. ["label"]=> string(8) "Page 2.2"
  697. ["id"]=> NULL
  698. ["class"]=> NULL
  699. ["title"]=> NULL
  700. ["target"]=> NULL
  701. ["rel"]=> array(0) {
  702. }
  703. ["rev"]=> array(0) {
  704. }
  705. ["order"]=> NULL
  706. ["resource"]=> NULL
  707. ["privilege"]=> NULL
  708. ["active"]=> bool(false)
  709. ["visible"]=> bool(true)
  710. ["type"]=> string(23) "Zend_Navigation_Page_Uri"
  711. ["pages"]=> array(0) {
  712. }
  713. ["uri"]=> string(1) "#"
  714. }
  715. }
  716. ["uri"]=> string(1) "#"
  717. }
  718. }
  719. */
  720. ]]></programlisting>
  721. </example>
  722. </sect2>
  723. </sect1>