1: <?php
2:
3: namespace Charcoal\App\Template;
4:
5: // Dependencies from `Pimple`
6: use \Pimple\Container;
7:
8: /**
9: *
10: */
11: interface WidgetInterface
12: {
13: /**
14: * Give an opportunity to children classes to inject dependencies from a Pimple Container.
15: *
16: * Does nothing by default, reimplement in children classes.
17: *
18: * The `$container` DI-container (from `Pimple`) should not be saved or passed around, only to be used to
19: * inject dependencies (typically via setters).
20: *
21: * @param Container $container A dependencies container instance.
22: * @return void
23: */
24: public function setDependencies(Container $container);
25:
26: /**
27: * @param array $data The template data to set.
28: * @return WidgetInterface Chainable
29: */
30: public function setData(array $data);
31:
32: /**
33: * @param boolean $active The active flag.
34: * @return WidgetInterface Chainable
35: */
36: public function setActive($active);
37:
38: /**
39: * @return boolean
40: */
41: public function active();
42: }
43: