PHP Класс yii\web\Application

С версии: 2.0
Автор: Qiang Xue ([email protected])
Наследование: extends yii\base\Application
Показать файл Открыть проект Примеры использования класса

Открытые свойства

Свойство Тип Описание
$catchAll the configuration specifying a controller action which should handle all user requests. This is mainly used when the application is in maintenance mode and needs to handle all incoming requests via a single action. The configuration is an array whose first element specifies the route of the action. The rest of the array elements (key-value pairs) specify the parameters to be bound to the action. For example, php [ 'offline/notice', 'param1' => 'value1', 'param2' => 'value2', ] Defaults to null, meaning catch-all is not used.
$controller the currently active controller instance
$defaultRoute the default route of this application. Defaults to 'site'.

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

Метод Описание
coreComponents ( )
getErrorHandler ( ) : ErrorHandler Returns the error handler component.
getHomeUrl ( ) : string
getRequest ( ) : Request Returns the request component.
getResponse ( ) : Response Returns the response component.
getSession ( ) : yii\web\Session Returns the session component.
getUser ( ) : User Returns the user component.
handleRequest ( Request $request ) : Response Handles the specified request.
setHomeUrl ( string $value )

Защищенные методы

Метод Описание
bootstrap ( )

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

bootstrap() защищенный Метод

protected bootstrap ( )

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

public coreComponents ( )

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

Returns the error handler component.
public getErrorHandler ( ) : ErrorHandler
Результат ErrorHandler the error handler application component.

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

public getHomeUrl ( ) : string
Результат string the homepage URL

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

Returns the request component.
public getRequest ( ) : Request
Результат Request the request component.

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

Returns the response component.
public getResponse ( ) : Response
Результат Response the response component.

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

Returns the session component.
public getSession ( ) : yii\web\Session
Результат yii\web\Session the session component.

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

Returns the user component.
public getUser ( ) : User
Результат User the user component.

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

Handles the specified request.
public handleRequest ( Request $request ) : Response
$request Request the request to be handled
Результат Response the resulting response

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

public setHomeUrl ( string $value )
$value string the homepage URL

Описание свойств

$catchAll публичное свойство

the configuration specifying a controller action which should handle all user requests. This is mainly used when the application is in maintenance mode and needs to handle all incoming requests via a single action. The configuration is an array whose first element specifies the route of the action. The rest of the array elements (key-value pairs) specify the parameters to be bound to the action. For example, php [ 'offline/notice', 'param1' => 'value1', 'param2' => 'value2', ] Defaults to null, meaning catch-all is not used.
public $catchAll

$controller публичное свойство

the currently active controller instance
public $controller

$defaultRoute публичное свойство

the default route of this application. Defaults to 'site'.
public $defaultRoute