web\Application $errorHandler

$errorHandler public read-only property The error handler application component. public yii\web\ErrorHandler getErrorHandler ( )

web\Application $defaultRoute

$defaultRoute public property The default route of this application. Defaults to 'site'. public string $defaultRoute = 'site'

web\Application $controller

$controller public property The currently active controller instance public yii\web\Controller $controller = null

web\Application $catchAll

$catchAll public property 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, [ 'offline/notice', 'param1' => 'value1',

Views

Creating Views Rendering Views Layouts Using View Components View Events Rendering Static Pages Best Practices Views are part of the MVC architecture. They are code responsible for presenting data to end users. In a Web application, views are usually created in terms of view templates which are PHP script files containing mainly HTML code and presentational PHP code. They are managed by the view application component which provides commonly used methods to facilitate view composition and rende

validators\Validator validateValue()

validateValue() protected method Validates a value. A validator class can implement this method to support data validation out of the context of a data model. protected array|null validateValue ( $value )$value mixed The data value to be validated. return array|null The error message and the parameters to be inserted into the error message. Null should be returned if the data is valid. throws yii\base\NotSupportedException if the validator does not supporting data validation withou

validators\Validator validateAttributes()

validateAttributes() public method Validates the specified object. public void validateAttributes ( $model, $attributes = null )$model yii\base\Model The data model being validated $attributes array|null The list of attributes to be validated. Note that if an attribute is not associated with the validator, or is is prefixed with ! char - it will be ignored. If this parameter is null, every attribute listed in $attributes will be validated.

validators\Validator validateAttribute()

validateAttribute() public method Validates a single attribute. Child classes must implement this method to provide the actual validation logic. public void validateAttribute ( $model, $attribute )$model yii\base\Model The data model to be validated $attribute string The name of the attribute to be validated.

validators\Validator validate()

validate() public method Validates a given value. You may use this method to validate a value out of the context of a data model. public boolean validate ( $value, &$error = null )$value mixed The data value to be validated. $error string The error message to be returned, if the validation fails. return boolean Whether the data is valid.

validators\Validator isEmpty()

isEmpty() public method Checks if the given value is empty. A value is considered empty if it is null, an empty array, or an empty string. Note that this method is different from PHP empty(). It will return false when the value is 0. public boolean isEmpty ( $value )$value mixed The value to be checked return boolean Whether the value is empty