| 1 | <?php |
||
| 7 | abstract class ValidatableArrayObject extends ArrayObject |
||
| 8 | { |
||
| 9 | /** |
||
| 10 | * {@inheritdoc} |
||
| 11 | */ |
||
| 12 | 35 | public function __construct($input = array(), $flags = 0, $iteratorClass = 'ArrayIterator') |
|
| 18 | |||
| 19 | /** |
||
| 20 | * @param string|null $index The index to validate, if null, validate all properties |
||
| 21 | * @return void |
||
| 22 | * @throws \InvalidArgumentException |
||
| 23 | */ |
||
| 24 | abstract protected function validate($index = null); |
||
| 25 | |||
| 26 | /** |
||
| 27 | * {@inheritdoc} |
||
| 28 | */ |
||
| 29 | 4 | public function offsetSet($index, $newval) |
|
| 35 | |||
| 36 | /** |
||
| 37 | * {@inheritdoc} |
||
| 38 | */ |
||
| 39 | 4 | public function offsetUnset($index) |
|
| 45 | } |
||
| 46 |