| 1 | <?php |
||
| 11 | class Validation implements ValidationInterface |
||
| 12 | { |
||
| 13 | /** |
||
| 14 | * @var array [$name =>] |
||
| 15 | */ |
||
| 16 | private $failure = []; |
||
| 17 | |||
| 18 | /** |
||
| 19 | * @var MethodInvocation |
||
| 20 | */ |
||
| 21 | private $invocation; |
||
| 22 | |||
| 23 | public function __construct(array $failure = []) |
||
| 27 | |||
| 28 | public function setInvocation(MethodInvocation $invocation) |
||
| 32 | |||
| 33 | /** |
||
| 34 | * @param string $name error target name |
||
| 35 | * @param string $message message |
||
| 36 | */ |
||
| 37 | public function addError($name, $message) |
||
| 41 | |||
| 42 | /** |
||
| 43 | * @param array $message |
||
| 44 | */ |
||
| 45 | public function addErrors(array $message) |
||
| 49 | |||
| 50 | /** |
||
| 51 | * @return array |
||
| 52 | */ |
||
| 53 | public function getMessages() |
||
| 57 | |||
| 58 | /** |
||
| 59 | * @return MethodInvocation |
||
| 60 | */ |
||
| 61 | public function getInvocation() |
||
| 65 | } |
||
| 66 |