1 | <?php |
||
19 | final class TemplateBuffer |
||
20 | { |
||
21 | /** |
||
22 | * @var callable |
||
23 | */ |
||
24 | private $callable; |
||
25 | |||
26 | /** |
||
27 | * @var int |
||
28 | */ |
||
29 | private $priority; |
||
30 | |||
31 | /** |
||
32 | * @var string |
||
33 | */ |
||
34 | private $output; |
||
35 | |||
36 | 2 | public function __construct(callable $callable, $priority = 0) |
|
42 | |||
43 | /** |
||
44 | * Execute template. |
||
45 | * |
||
46 | * @return TemplateBuffer $this |
||
47 | */ |
||
48 | 2 | public function execute() |
|
63 | |||
64 | /** |
||
65 | * Get execution priority. |
||
66 | * |
||
67 | * @return int |
||
68 | */ |
||
69 | 2 | public function getPriority() |
|
73 | |||
74 | /** |
||
75 | * Get template buffer output. |
||
76 | * |
||
77 | * @return string |
||
78 | */ |
||
79 | 2 | public function getOutput() |
|
87 | } |
||
88 |