1 | <?php |
||
20 | abstract class AbstractValue |
||
21 | { |
||
22 | /** |
||
23 | * @var Compiler |
||
24 | */ |
||
25 | protected $compiler; |
||
26 | |||
27 | /** |
||
28 | * @var Coerce |
||
29 | */ |
||
30 | protected $coerce; |
||
31 | |||
32 | /** |
||
33 | * @var array |
||
34 | */ |
||
35 | protected $options = [ |
||
36 | 'numberPrecision' => null, |
||
37 | 'compressColors' => false, |
||
38 | ]; |
||
39 | |||
40 | /** |
||
41 | * AbstractValue constructor. |
||
42 | * |
||
43 | * @param Compiler $compiler |
||
44 | * @param Coerce $coerce |
||
45 | * @param array $options |
||
46 | */ |
||
47 | 52 | public function __construct(Compiler $compiler, Coerce $coerce, array $options = []) |
|
53 | |||
54 | /** |
||
55 | * @param Compiler $compiler |
||
56 | * @param Coerce $coerce |
||
57 | * @param array $options |
||
58 | * @param array $value |
||
59 | * |
||
60 | * @return self |
||
61 | */ |
||
62 | 53 | public static function factory(Compiler $compiler, Coerce $coerce, array $options, array $value) |
|
81 | |||
82 | /** |
||
83 | * @return string |
||
84 | */ |
||
85 | abstract public function getCompiled(); |
||
86 | |||
87 | /** |
||
88 | * Initialize value from old array format. |
||
89 | * |
||
90 | * @param array $value |
||
91 | * |
||
92 | * @return void |
||
93 | * @deprecated |
||
94 | */ |
||
95 | abstract public function initializeFromOldFormat(array $value); |
||
96 | } |
||
97 |
This method has been deprecated.