1 | <?php |
||
12 | class TextElement extends Element |
||
13 | { |
||
14 | |||
15 | /** |
||
16 | * @var string |
||
17 | */ |
||
18 | private $text; |
||
19 | |||
20 | /** |
||
21 | * @param string $text |
||
22 | */ |
||
23 | public function __construct($text) |
||
35 | |||
36 | /** |
||
37 | * @return string |
||
38 | */ |
||
39 | public function __toString() |
||
43 | |||
44 | /** |
||
45 | * @return string |
||
46 | */ |
||
47 | public function getText() |
||
51 | |||
52 | /** |
||
53 | * @return string |
||
54 | */ |
||
55 | public function render() |
||
81 | |||
82 | /** |
||
83 | * Check if given string contains color escape code |
||
84 | * |
||
85 | * @param string $string |
||
86 | * |
||
87 | * @return boolean |
||
88 | */ |
||
89 | private static function containsEscapeCharacters($string) |
||
96 | } |
||
97 |