| 1 | <?php |
||
| 8 | class Runner |
||
| 9 | { |
||
| 10 | /** |
||
| 11 | * @var Context |
||
| 12 | */ |
||
| 13 | protected $context; |
||
| 14 | |||
| 15 | /** |
||
| 16 | * @var RuleInterface |
||
| 17 | */ |
||
| 18 | protected $rule; |
||
| 19 | |||
| 20 | /** |
||
| 21 | * @var ErrorCollectionInterface |
||
| 22 | */ |
||
| 23 | protected $errors; |
||
| 24 | |||
| 25 | /** |
||
| 26 | * @param RuleInterface $rule |
||
| 27 | * @param Context $context |
||
| 28 | * @param ErrorCollectionInterface $errors |
||
| 29 | */ |
||
| 30 | public function __construct(RuleInterface $rule, Context $context = null, ErrorCollectionInterface $errors = null) |
||
| 36 | |||
| 37 | /** |
||
| 38 | * @param string $string |
||
| 39 | * @return bool|Result |
||
| 40 | * @throws \Exception |
||
| 41 | */ |
||
| 42 | public function run($string) |
||
| 48 | |||
| 49 | /** |
||
| 50 | * @return bool|ParsingErrorInterface |
||
| 51 | */ |
||
| 52 | public function hasError() |
||
| 61 | } |
||
| 62 |