1 | <?php |
||
20 | class SlotViewHelperService implements SingletonInterface |
||
21 | { |
||
22 | /** |
||
23 | * Contains the closures which will render the registered slots. The keys |
||
24 | * of this array are the names of the slots. |
||
25 | * |
||
26 | * @var Closure[] |
||
27 | */ |
||
28 | private $slots = []; |
||
29 | |||
30 | /** |
||
31 | * Adds a closure - which will render the slot with the given name - to the |
||
32 | * private storage in this class. |
||
33 | * |
||
34 | * @param string $name |
||
35 | * @param Closure $closure |
||
36 | */ |
||
37 | public function addSlotClosure($name, Closure $closure) |
||
41 | |||
42 | /** |
||
43 | * Returns the closure which will render the slot with the given name. |
||
44 | * |
||
45 | * @param string $name |
||
46 | * @return Closure |
||
47 | * @throws EntryNotFoundException |
||
48 | */ |
||
49 | public function getSlotClosure($name) |
||
57 | |||
58 | /** |
||
59 | * @param string $name |
||
60 | * @return bool |
||
61 | */ |
||
62 | public function hasSlotClosure($name) |
||
66 | |||
67 | /** |
||
68 | * Resets the list of closures. |
||
69 | */ |
||
70 | public function resetState() |
||
74 | } |
||
75 |