1 | <?php |
||
23 | abstract class Request extends Component |
||
24 | { |
||
25 | private $_scriptFile; |
||
26 | private $_isConsoleRequest; |
||
27 | |||
28 | |||
29 | /** |
||
30 | * Resolves the current request into a route and the associated parameters. |
||
31 | * @return array the first element is the route, and the second is the associated parameters. |
||
32 | */ |
||
33 | abstract public function resolve(); |
||
34 | |||
35 | /** |
||
36 | * Returns a value indicating whether the current request is made via command line |
||
37 | * @return bool the value indicating whether the current request is made via console |
||
38 | */ |
||
39 | public function getIsConsoleRequest() |
||
43 | |||
44 | /** |
||
45 | * Sets the value indicating whether the current request is made via command line |
||
46 | * @param bool $value the value indicating whether the current request is made via command line |
||
47 | */ |
||
48 | public function setIsConsoleRequest($value) |
||
52 | |||
53 | /** |
||
54 | * Returns entry script file path. |
||
55 | * @return string entry script file path (processed w/ realpath()) |
||
56 | * @throws InvalidConfigException if the entry script file path cannot be determined automatically. |
||
57 | */ |
||
58 | 3 | public function getScriptFile() |
|
70 | |||
71 | /** |
||
72 | * Sets the entry script file path. |
||
73 | * The entry script file path can normally be determined based on the `SCRIPT_FILENAME` SERVER variable. |
||
74 | * However, for some server configurations, this may not be correct or feasible. |
||
75 | * This setter is provided so that the entry script file path can be manually specified. |
||
76 | * @param string $value the entry script file path. This can be either a file path or a path alias. |
||
77 | * @throws InvalidConfigException if the provided entry script file path is invalid. |
||
78 | */ |
||
79 | 3 | public function setScriptFile($value) |
|
88 | } |
||
89 |