1 | <?php |
||
10 | class DirectScriptHandler extends AbstractRequestHandler |
||
11 | { |
||
12 | /** Options key for the path mapping array */ |
||
13 | const KEY_PATH_MAP = 'pathMap'; |
||
14 | |||
15 | private $scriptPath; |
||
16 | |||
17 | /** |
||
18 | * Returns true if the handler determines it should handle this request and false otherwise. |
||
19 | * @param string $path The URL path for the request. |
||
20 | * @param array $query The query parameters. |
||
21 | * @param array $post The post data. |
||
22 | * @param string $verb The HTTP verb used in the request. |
||
23 | * @return boolean Returns true if this handler will handle the request and false otherwise. |
||
24 | */ |
||
25 | 2 | public function isAppropriate($path, $query, $post, $verb) |
|
43 | |||
44 | /** |
||
45 | * Returns a request object extracted from the request details (path, query, etc). The method |
||
46 | * isAppropriate() must have returned true, otherwise this method should return null. |
||
47 | * @return \Vectorface\SnappyRouter\Request\HttpRequest|null Returns a |
||
48 | * Request object or null if this handler is not appropriate. |
||
49 | */ |
||
50 | 1 | public function getRequest() |
|
54 | |||
55 | /** |
||
56 | * Performs the actual routing. |
||
57 | * @return mixed Returns the result of the route. |
||
58 | */ |
||
59 | 1 | public function performRoute() |
|
65 | } |
||
66 |