1 | <?php |
||
23 | final class TemplateBuffer |
||
24 | { |
||
25 | /** |
||
26 | * @var callable |
||
27 | */ |
||
28 | private $callable; |
||
29 | |||
30 | /** |
||
31 | * @var int |
||
32 | */ |
||
33 | private $priority; |
||
34 | |||
35 | /** |
||
36 | * @var string |
||
37 | */ |
||
38 | private $output; |
||
39 | |||
40 | 5 | public function __construct(callable $callable, $priority = 0) |
|
45 | |||
46 | /** |
||
47 | * Execute template. |
||
48 | * |
||
49 | * @return TemplateBuffer $this |
||
50 | */ |
||
51 | 4 | public function execute() |
|
61 | |||
62 | /** |
||
63 | * Get execution priority. |
||
64 | * |
||
65 | * @return int |
||
66 | */ |
||
67 | 4 | public function getPriority() |
|
71 | |||
72 | /** |
||
73 | * Get template buffer output. |
||
74 | * |
||
75 | * @return string |
||
76 | */ |
||
77 | 5 | public function getOutput() |
|
85 | } |
||
86 |