1: <?php
2:
3: namespace Charcoal\Ui\Menu;
4:
5: /**
6: * Defines a menu.
7: */
8: interface MenuInterface
9: {
10: /**
11: * @param array $items The menu items.
12: * @return MenuInterface Chainable
13: */
14: public function setItems(array $items);
15:
16: /**
17: * @param array|MenuItemInterface $item A menu item structure or object.
18: * @return MenuInterface Chainable
19: */
20: public function addItem($item);
21:
22: /**
23: * @return MenuItemInterface[]
24: */
25: public function items();
26:
27: /**
28: * @return boolean
29: */
30: public function hasItems();
31:
32: /**
33: * @return integer
34: */
35: public function numItems();
36: }
37: