1 | <?php |
||
12 | class ValueTransformer |
||
13 | { |
||
14 | /** |
||
15 | * @var DateTransformer |
||
16 | */ |
||
17 | protected $dateTransformer; |
||
18 | |||
19 | /** |
||
20 | * @var SharedStrings |
||
21 | */ |
||
22 | protected $sharedStrings; |
||
23 | |||
24 | /** |
||
25 | * @var Styles |
||
26 | */ |
||
27 | protected $styles; |
||
28 | |||
29 | /** |
||
30 | * @staticvar string Boolean type |
||
31 | */ |
||
32 | const TYPE_BOOL = 'b'; |
||
33 | |||
34 | /** |
||
35 | * @staticvar string Number type |
||
36 | */ |
||
37 | const TYPE_NUMBER = 'n'; |
||
38 | |||
39 | /** |
||
40 | * @staticvar string Error type |
||
41 | */ |
||
42 | const TYPE_ERROR = 'e'; |
||
43 | |||
44 | /** |
||
45 | * @staticvar string Shared string type |
||
46 | */ |
||
47 | const TYPE_SHARED_STRING = 's'; |
||
48 | |||
49 | /** |
||
50 | * @staticvar string String type |
||
51 | */ |
||
52 | const TYPE_STRING = 'str'; |
||
53 | |||
54 | /** |
||
55 | * @staticvar string Inline string type |
||
56 | */ |
||
57 | const TYPE_INLINE_STRING = 'inlineStr'; |
||
58 | |||
59 | /** |
||
60 | * Constructor |
||
61 | * |
||
62 | * @param DateTransformer $dateTransformer |
||
63 | * @param SharedStrings $sharedStrings |
||
64 | * @param Styles $styles |
||
65 | */ |
||
66 | public function __construct(DateTransformer $dateTransformer, SharedStrings $sharedStrings, Styles $styles) |
||
72 | |||
73 | /** |
||
74 | * Formats a value |
||
75 | * |
||
76 | * @param string $value The value which should be transformed |
||
77 | * @param string $type The type of the value |
||
78 | * @param string $style The style of the value |
||
79 | * |
||
80 | * @return mixed |
||
81 | */ |
||
82 | public function transform($value, $type, $style) |
||
98 | } |
||
99 |