3 // Copyright (c) 2011 Blue Static
5 // This program is free software: you can redistribute it and/or modify it
6 // under the terms of the GNU General Public License as published by the Free
7 // Software Foundation, either version 3 of the License, or any later version.
9 // This program is distributed in the hope that it will be useful, but WITHOUT
10 // ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 // FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
14 // You should have received a copy of the GNU General Public License along with
15 // this program. If not, see <http://www.gnu.org/licenses/>.
17 namespace hoplite\http
;
20 This abstract class is the base for handling all requests and filling out
25 /*! \var RootController */
29 Creates a new action with a reference to the RootController.
32 public function __construct($controller)
34 $this->controller
= $controller;
37 /*! Accesses the RootController */
38 public function controller() { return $this->controller
; }
41 Called before the Action is Invoked().
43 public function FilterRequest(Request
$request, Response
$response) {}
46 Performs the action and fills out the response's data model.
48 public abstract function Invoke(Request
$request, Response
$response);
51 Called after this has been Invoked().
53 public function FilterResponse(Request
$request, Response
$response) {}