| 1 | <?php |
||
| 12 | abstract class AbstractStub implements StubInterface |
||
| 13 | { |
||
| 14 | const REGEX_NAME = '/^[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*$/'; |
||
| 15 | |||
| 16 | /** |
||
| 17 | * @var string |
||
| 18 | */ |
||
| 19 | protected $name; |
||
| 20 | |||
| 21 | /** |
||
| 22 | * @var mixed |
||
| 23 | */ |
||
| 24 | protected $value; |
||
| 25 | |||
| 26 | /** |
||
| 27 | * AbstractStub constructor. |
||
| 28 | * @param string $name |
||
| 29 | * @param mixed $value |
||
| 30 | * |
||
| 31 | * @throws InvalidArgumentException |
||
| 32 | */ |
||
| 33 | 103 | public function __construct(string $name, $value) |
|
| 47 | |||
| 48 | /** |
||
| 49 | * @return string |
||
| 50 | */ |
||
| 51 | 96 | public function getName(): string |
|
| 55 | |||
| 56 | /** |
||
| 57 | * @return mixed |
||
| 58 | */ |
||
| 59 | 96 | public function getValue() |
|
| 63 | } |
||
| 64 |