| 1 | <?php |
||
| 6 | class GenericLink implements Link { |
||
| 7 | |||
| 8 | private $actionId; |
||
| 9 | private $parameters; |
||
| 10 | private $handles; |
||
| 11 | private $confirmation; |
||
| 12 | |||
| 13 | public function __construct($actionId, callable $handles, callable $parameters = null) { |
||
| 20 | |||
| 21 | public function setHandles(callable $handles) { |
||
| 25 | |||
| 26 | /** |
||
| 27 | * @param object $object |
||
| 28 | * @return boolean |
||
| 29 | */ |
||
| 30 | public function handles($object) { |
||
| 33 | |||
| 34 | /** |
||
| 35 | * @return string |
||
| 36 | */ |
||
| 37 | public function actionId() { |
||
| 40 | |||
| 41 | /** |
||
| 42 | * @param object $object |
||
| 43 | * @return array|mixed[] Values indexed by parameter names |
||
| 44 | */ |
||
| 45 | public function parameters($object) { |
||
| 48 | |||
| 49 | /** |
||
| 50 | * Message that needs to be confirmed before the action can be executed |
||
| 51 | * @param string|null $confirmation |
||
| 52 | * @return $this |
||
| 53 | */ |
||
| 54 | public function setConfirmation($confirmation) { |
||
| 58 | |||
| 59 | /** |
||
| 60 | * A message that needs to be confirmed before the action can be executed (or null if not required) |
||
| 61 | * @return string|null |
||
| 62 | */ |
||
| 63 | public function confirm() { |
||
| 66 | } |