| 1 | <?php |
||
| 27 | abstract class StringObject implements JsonSerializable |
||
| 28 | { |
||
| 29 | /** |
||
| 30 | * Contains the string data |
||
| 31 | * |
||
| 32 | * @var string |
||
| 33 | */ |
||
| 34 | protected $stringData; |
||
| 35 | |||
| 36 | /** |
||
| 37 | * @param string $stringData |
||
| 38 | * |
||
| 39 | * @throws InvalidArgumentException If given f-number is not a string |
||
| 40 | */ |
||
| 41 | public function __construct($stringData) |
||
| 49 | |||
| 50 | /** |
||
| 51 | * Sets the stringData |
||
| 52 | * |
||
| 53 | * @param string $stringData |
||
| 54 | * |
||
| 55 | * @return void |
||
| 56 | */ |
||
| 57 | protected function setStringData($stringData) |
||
| 61 | |||
| 62 | /** |
||
| 63 | * Getter for stringData |
||
| 64 | * |
||
| 65 | * @return string |
||
| 66 | */ |
||
| 67 | public function getStringData() |
||
| 71 | |||
| 72 | /** |
||
| 73 | * @inheritDoc |
||
| 74 | * |
||
| 75 | * @return string |
||
| 76 | */ |
||
| 77 | public function jsonSerialize() |
||
| 81 | |||
| 82 | /** |
||
| 83 | * Returns string representation |
||
| 84 | * |
||
| 85 | * @return string |
||
| 86 | */ |
||
| 87 | public function __toString() |
||
| 91 | } |
||
| 92 |