1 | <?php |
||
6 | final class Template |
||
7 | { |
||
8 | public $name; |
||
9 | public $data; |
||
10 | public $attributes; |
||
11 | public $reference; |
||
12 | public $parent; |
||
13 | |||
14 | 212 | public function __construct( |
|
27 | |||
28 | 72 | public function with($key, $value) { |
|
36 | |||
37 | /** Returns the deferenced parent template */ |
||
38 | 24 | public function parent() { |
|
41 | |||
42 | 8 | public function withName($name) { |
|
45 | |||
46 | 24 | public function withData(array $data) { |
|
49 | |||
50 | 28 | public function withAddedData(array $data) { |
|
53 | |||
54 | 4 | public function withAttributes(array $attributes) { |
|
57 | |||
58 | 76 | public function withAddedAttributes(array $attributes) { |
|
61 | |||
62 | 28 | public function __clone() { |
|
65 | |||
66 | /** Create a new template based off of this current one */ |
||
67 | 28 | public function fork($name, array $data = [], array $attributes = []) { |
|
76 | } |
||
77 |