PHP Class yii\base\Request

For more details and usage information on Request, see the guide article on requests.
Since: 2.0
Author: Qiang Xue ([email protected])
Inheritance: extends Component
Afficher le fichier Open project: yiisoft/yii2 Class Usage Examples

Méthodes publiques

Méthode Description
getIsConsoleRequest ( ) : boolean Returns a value indicating whether the current request is made via command line
getScriptFile ( ) : string Returns entry script file path.
resolve ( ) : array Resolves the current request into a route and the associated parameters.
setIsConsoleRequest ( boolean $value ) Sets the value indicating whether the current request is made via command line
setScriptFile ( string $value ) Sets the entry script file path.

Method Details

getIsConsoleRequest() public méthode

Returns a value indicating whether the current request is made via command line
public getIsConsoleRequest ( ) : boolean
Résultat boolean the value indicating whether the current request is made via console

getScriptFile() public méthode

Returns entry script file path.
public getScriptFile ( ) : string
Résultat string entry script file path (processed w/ realpath())

resolve() abstract public méthode

Resolves the current request into a route and the associated parameters.
abstract public resolve ( ) : array
Résultat array the first element is the route, and the second is the associated parameters.

setIsConsoleRequest() public méthode

Sets the value indicating whether the current request is made via command line
public setIsConsoleRequest ( boolean $value )
$value boolean the value indicating whether the current request is made via command line

setScriptFile() public méthode

The entry script file path can normally be determined based on the SCRIPT_FILENAME SERVER variable. However, for some server configurations, this may not be correct or feasible. This setter is provided so that the entry script file path can be manually specified.
public setScriptFile ( string $value )
$value string the entry script file path. This can be either a file path or a path alias.