1: <?php
2:
3: namespace Charcoal\Cms\Support\Interfaces;
4:
5: use Charcoal\Cms\SectionInterface;
6:
7: interface SectionLoaderAwareInterface
8: {
9: /**
10: * @return \ArrayAccess|\Traversable
11: */
12: public function sections();
13:
14: /**
15: * @return \ArrayAccess|\Traversable
16: */
17: public function masterSections();
18:
19: /**
20: * @return \ArrayAccess|\Traversable
21: */
22: public function childrenSections();
23:
24: /**
25: * Gets the latest route for the given slug.
26: * @return \ArrayAccess|\Traversable
27: */
28: public function routes();
29:
30: /**
31: * Gets the current section based on AbstractTemplate::Section and context.
32: * @param boolean $raw Option the receive the non-formatted section.
33: * @return array|SectionInterface
34: */
35: public function currentSection($raw = false);
36:
37: /**
38: * @param string $slug The section slug to load from.
39: * @return SectionInterface|array
40: */
41: public function sectionFromSlug($slug);
42: }
43: