| 1 | <?php |
||
| 10 | class Callback implements CallbackInterface |
||
| 11 | { |
||
| 12 | const CLAUSE_AFTER = 'after'; |
||
| 13 | const CLAUSE_BEFORE = 'before'; |
||
| 14 | const CLAUSE_FROM = 'from'; |
||
| 15 | const CLAUSE_TO = 'to'; |
||
| 16 | const CLAUSE_ON = 'on'; |
||
| 17 | const CLAUSE_DO = 'do'; |
||
| 18 | |||
| 19 | /** |
||
| 20 | * @var CallbackSpecificationInterface |
||
| 21 | */ |
||
| 22 | private $specification; |
||
| 23 | |||
| 24 | /** |
||
| 25 | * @var array callable |
||
| 26 | 55 | */ |
|
| 27 | private $callable; |
||
| 28 | 55 | ||
| 29 | 55 | /** |
|
| 30 | 55 | * @param CallbackSpecificationInterface $callbackSpecification |
|
| 31 | * @param $callable |
||
| 32 | */ |
||
| 33 | public function __construct(CallbackSpecificationInterface $callbackSpecification, $callable) |
||
| 38 | |||
| 39 | /** |
||
| 40 | * @return CallbackSpecificationInterface |
||
| 41 | */ |
||
| 42 | public function getSpecification() |
||
| 46 | 30 | ||
| 47 | 24 | /** |
|
| 48 | 35 | * @return array callable |
|
| 49 | */ |
||
| 50 | public function getCallbacks() |
||
| 54 | |||
| 55 | 30 | /** |
|
| 56 | * @return array |
||
| 57 | */ |
||
| 58 | public function getClauses() |
||
| 62 | |||
| 63 | /** |
||
| 64 | * {@inheritdoc} |
||
| 65 | */ |
||
| 66 | public function __invoke(TransitionEvent $event) |
||
| 72 | |||
| 73 | /** |
||
| 74 | * {@inheritdoc} |
||
| 75 | */ |
||
| 76 | protected function call($object, TransitionEvent $event) |
||
| 80 | } |
||
| 81 |