1 | <?php |
||
20 | abstract class AbstractValue |
||
21 | { |
||
22 | /** @var Compiler */ |
||
23 | protected $compiler; |
||
24 | /** @var Coerce */ |
||
25 | protected $coerce; |
||
26 | |||
27 | protected $options = [ |
||
28 | 'numberPrecision' => null, |
||
29 | 'compressColors' => false, |
||
30 | ]; |
||
31 | |||
32 | /** |
||
33 | * AbstractValue constructor. |
||
34 | * |
||
35 | * @param Compiler $compiler |
||
36 | * @param Coerce $coerce |
||
37 | * @param array $options |
||
38 | */ |
||
39 | 52 | public function __construct(Compiler $compiler, Coerce $coerce, array $options = []) |
|
45 | |||
46 | /** |
||
47 | * @param Compiler $compiler |
||
48 | * @param Coerce $coerce |
||
49 | * @param array $options |
||
50 | * @param array $value |
||
51 | * |
||
52 | * @return self |
||
53 | */ |
||
54 | 53 | public static function factory(Compiler $compiler, Coerce $coerce, array $options, array $value) |
|
73 | |||
74 | /** |
||
75 | * @return string |
||
76 | */ |
||
77 | abstract public function getCompiled(); |
||
78 | |||
79 | /** |
||
80 | * Initialize value from old array format. |
||
81 | * |
||
82 | * @param array $value |
||
83 | * |
||
84 | * @return void |
||
85 | * @deprecated |
||
86 | */ |
||
87 | abstract public function initializeFromOldFormat(array $value); |
||
88 | } |
This method has been deprecated.