| 1 | <?php |
||
| 5 | abstract class Action implements Executable |
||
| 6 | { |
||
| 7 | /** |
||
| 8 | * The model instance |
||
| 9 | * @var ActiveRecord |
||
| 10 | */ |
||
| 11 | protected $model; |
||
| 12 | |||
| 13 | /** |
||
| 14 | * Action Constructor. |
||
| 15 | * |
||
| 16 | * @param ActiveRecord $model The model performing the action |
||
| 17 | */ |
||
| 18 | public function __construct(ActiveRecord $model) |
||
| 22 | |||
| 23 | /** |
||
| 24 | * Execute the action. |
||
| 25 | * |
||
| 26 | * @return void |
||
| 27 | */ |
||
| 28 | abstract public function execute(); |
||
| 29 | } |
||
| 30 |