PHP Класс yii\base\Request

For more details and usage information on Request, see the guide article on requests.
С версии: 2.0
Автор: Qiang Xue ([email protected])
Наследование: extends Component
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
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.

Описание методов

getIsConsoleRequest() публичный Метод

Returns a value indicating whether the current request is made via command line
public getIsConsoleRequest ( ) : boolean
Результат boolean the value indicating whether the current request is made via console

getScriptFile() публичный Метод

Returns entry script file path.
public getScriptFile ( ) : string
Результат string entry script file path (processed w/ realpath())

resolve() абстрактный публичный Метод

Resolves the current request into a route and the associated parameters.
abstract public resolve ( ) : array
Результат array the first element is the route, and the second is the associated parameters.

setIsConsoleRequest() публичный Метод

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() публичный Метод

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.