| 1 | <?php |
||
| 11 | abstract class StringType extends Element |
||
| 12 | { |
||
| 13 | /** |
||
| 14 | * String value. |
||
| 15 | * |
||
| 16 | * @var string $_string |
||
| 17 | */ |
||
| 18 | protected $_string; |
||
| 19 | |||
| 20 | /** |
||
| 21 | * Constructor |
||
| 22 | * |
||
| 23 | * @param string $string |
||
| 24 | * @throws \InvalidArgumentException |
||
| 25 | */ |
||
| 26 | 116 | public function __construct($string) { |
|
| 34 | |||
| 35 | /** |
||
| 36 | * Get string value. |
||
| 37 | * |
||
| 38 | * @return string |
||
| 39 | */ |
||
| 40 | 32 | public function string() { |
|
| 43 | |||
| 44 | /** |
||
| 45 | * Check whether string is valid for the concrete type. |
||
| 46 | * |
||
| 47 | * @param string $string |
||
| 48 | * @return bool |
||
| 49 | */ |
||
| 50 | 60 | protected function _validateString($string) { |
|
| 54 | } |
||
| 55 |