Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | n/a |
0 / 0 |
n/a |
0 / 0 |
CRAP | n/a |
0 / 0 |
|||
| 1 | <?php |
| 2 | /** |
| 3 | * Pop PHP Framework (https://www.popphp.org/) |
| 4 | * |
| 5 | * @link https://github.com/popphp/popphp-framework |
| 6 | * @author Nick Sagona, III <dev@noladev.com> |
| 7 | * @copyright Copyright (c) 2009-2025 NOLA Interactive, LLC. |
| 8 | * @license https://www.popphp.org/license New BSD License |
| 9 | */ |
| 10 | |
| 11 | /** |
| 12 | * @namespace |
| 13 | */ |
| 14 | namespace Pop\Controller; |
| 15 | |
| 16 | /** |
| 17 | * Pop controller interface |
| 18 | * |
| 19 | * @category Pop |
| 20 | * @package Pop\Controller |
| 21 | * @author Nick Sagona, III <dev@noladev.com> |
| 22 | * @copyright Copyright (c) 2009-2025 NOLA Interactive, LLC. |
| 23 | * @license https://www.popphp.org/license New BSD License |
| 24 | * @version 4.3.7 |
| 25 | */ |
| 26 | interface ControllerInterface |
| 27 | { |
| 28 | |
| 29 | /** |
| 30 | * Set the default action |
| 31 | * |
| 32 | * @param string $default |
| 33 | * @return ControllerInterface |
| 34 | */ |
| 35 | public function setDefaultAction(string $default): ControllerInterface; |
| 36 | |
| 37 | /** |
| 38 | * Get the default action |
| 39 | * |
| 40 | * @return string |
| 41 | */ |
| 42 | public function getDefaultAction(): string; |
| 43 | |
| 44 | |
| 45 | /** |
| 46 | * Set the maintenance action |
| 47 | * |
| 48 | * @param string $maintenance |
| 49 | * @return AbstractController |
| 50 | */ |
| 51 | public function setMaintenanceAction(string $maintenance): ControllerInterface; |
| 52 | |
| 53 | /** |
| 54 | * Get the maintenance action |
| 55 | * |
| 56 | * @return string |
| 57 | */ |
| 58 | public function getMaintenanceAction(): string; |
| 59 | |
| 60 | /** |
| 61 | * Set bypass maintenance flag |
| 62 | * |
| 63 | * @param bool $bypass |
| 64 | * @return static |
| 65 | */ |
| 66 | public function setBypassMaintenance(bool $bypass = true): static; |
| 67 | |
| 68 | /** |
| 69 | * Check the bypass maintenace check |
| 70 | * |
| 71 | * @return bool |
| 72 | */ |
| 73 | public function bypassMaintenance(): bool; |
| 74 | |
| 75 | /** |
| 76 | * Dispatch the controller based on the action |
| 77 | * |
| 78 | * @param ?string $action |
| 79 | * @param ?array $params |
| 80 | * @throws Exception |
| 81 | * @return void |
| 82 | */ |
| 83 | public function dispatch(string $action = null, ?array $params = null): void; |
| 84 | |
| 85 | } |