1 | <?php |
||
19 | final class BufferManager |
||
20 | { |
||
21 | /** |
||
22 | * @var BufferQueue |
||
23 | */ |
||
24 | private $executionQueue; |
||
25 | |||
26 | /** |
||
27 | * @var array |
||
28 | */ |
||
29 | private $renderingQueue; |
||
30 | |||
31 | /** |
||
32 | * @var string |
||
33 | */ |
||
34 | private $output; |
||
35 | |||
36 | public function __construct() |
||
42 | |||
43 | /** |
||
44 | * Add closure to buffer execution queue. |
||
45 | * |
||
46 | * @param callable $callable |
||
47 | * @param int $priority |
||
48 | */ |
||
49 | public function bufferize(callable $callable, $priority = 0) |
||
56 | |||
57 | /** |
||
58 | * Get output. |
||
59 | * |
||
60 | * @return string |
||
61 | */ |
||
62 | public function render() |
||
66 | |||
67 | /** |
||
68 | * Display output. |
||
69 | * |
||
70 | * @return string |
||
71 | */ |
||
72 | public function display() |
||
76 | |||
77 | /** |
||
78 | * Execute buffered templates and get output. |
||
79 | * |
||
80 | * @return string |
||
81 | */ |
||
82 | private function getOutput() |
||
101 | } |