1 | <?php |
||
12 | class AbstractRequest implements RequestInterface |
||
13 | { |
||
14 | /** The controller to use in the request. */ |
||
15 | private $controller; |
||
16 | /** The action to invoke in the request. */ |
||
17 | private $action; |
||
18 | |||
19 | /** |
||
20 | * Constructor for the abstract request. |
||
21 | * @param string $controller The controller to be used. |
||
22 | * @param string $action The action to be invoked. |
||
23 | */ |
||
24 | 42 | public function __construct($controller, $action) |
|
29 | |||
30 | /** |
||
31 | * Returns the controller to be used in the request. |
||
32 | * @return string Returns the controller DI key to be used in the request. |
||
33 | */ |
||
34 | 22 | public function getController() |
|
38 | |||
39 | /** |
||
40 | * Sets the controller to be used in the request. |
||
41 | * @param string $controller The controller DI key to be used in the request. |
||
42 | * @return RequestInterface Returns $this. |
||
43 | */ |
||
44 | 42 | public function setController($controller) |
|
49 | |||
50 | /** |
||
51 | * Returns the action to be invoked as a string. |
||
52 | * @return string The action to be invoked. |
||
53 | */ |
||
54 | 21 | public function getAction() |
|
58 | |||
59 | /** |
||
60 | * Sets the action to be invoked by the request |
||
61 | * @param string $action The action to be invoked by the request. |
||
62 | * @return RequestInterface Returns $this. |
||
63 | */ |
||
64 | 42 | public function setAction($action) |
|
69 | } |
||
70 |