1 | <?php |
||
22 | class VOString extends ValueObject implements VOStringable, \Countable, Diffable |
||
23 | { |
||
24 | use Mixin; |
||
25 | |||
26 | /** |
||
27 | * VOString constructor. |
||
28 | * |
||
29 | * @param $value |
||
30 | * @throws InvalidTypeException |
||
31 | */ |
||
32 | 61 | public function __construct($value) |
|
40 | |||
41 | /** |
||
42 | * @return string |
||
43 | */ |
||
44 | 56 | public function getValue() |
|
48 | |||
49 | /** |
||
50 | * @return string |
||
51 | */ |
||
52 | 10 | public function toString() |
|
56 | |||
57 | /** |
||
58 | * @param string $string |
||
59 | * @return static |
||
60 | */ |
||
61 | 30 | public static function fromString($string) |
|
65 | |||
66 | /** |
||
67 | * @return int |
||
68 | */ |
||
69 | public function count() |
||
73 | |||
74 | /** |
||
75 | * @param ValueObjectInterface $object |
||
76 | * @return static |
||
77 | */ |
||
78 | public function diff(ValueObjectInterface $object) |
||
82 | |||
83 | /** |
||
84 | * @return string |
||
85 | */ |
||
86 | 3 | public function getNumbers() |
|
90 | |||
91 | /** |
||
92 | * @return string |
||
93 | */ |
||
94 | 3 | public function getLetters() |
|
98 | } |
||
99 |