Console applications

Usage The entry script Configuration Creating your own console commands Besides the rich features for building web applications, Yii also has full-featured support for console applications which are mainly used to create background and maintenance tasks that need to be performed for a website. The structure of console applications is very similar to a Yii web application. It consists of one or more yii\console\Controller classes, which are often referred to as commands in the console environme

Shared Hosting Environment

Deploying a basic project template Deploying an advanced project template Shared hosting environments are often quite limited about configuration and directory structure. Still in most cases you can run Yii 2.0 on a shared hosting environment with a few adjustments. Deploying a basic project template Since in a shared hosting environment there's typically only one webroot, use the basic project template if you can. Refer to the Installing Yii chapter and install the basic project template lo

web\AssetManager publish()

publish() public method Publishes a file or a directory. This method will copy the specified file or directory to $basePath so that it can be accessed via the Web server. If the asset is a file, its file modification time will be checked to avoid unnecessary file copying. If the asset is a directory, all files and subdirectories under it will be published recursively. Note, in case $forceCopy is false the method only checks the existence of the target directory to avoid repetitive copying (

db\ColumnSchema $enumValues

$enumValues public property Enumerable values. This is set only if the column is declared to be an enumerable type. public array $enumValues = null

web\Session $count

$count public read-only property The number of session variables public integer getCount ( )

debug\models\search\Debug $ajax

$ajax public property Ajax attribute input search value public integer $ajax = null

data\BaseDataProvider prepareModels()

prepareModels() protected abstract method Prepares the data models that will be made available in the current page. protected abstract array prepareModels ( )return array The available data models

data\ArrayDataProvider sortModels()

sortModels() protected method Sorts the data models according to the given sort definition protected array sortModels ( $models, $sort )$models array The models to be sorted $sort yii\data\Sort The sort definition return array The sorted data models

web\User $idParam

$idParam public property The session variable name used to store the value of $id. public string $idParam = '__id'

db\oci\Schema resolveTableNames()

resolveTableNames() protected method Resolves the table name and schema name (if any). protected void resolveTableNames ( $table, $name )$table yii\db\TableSchema The table metadata object $name string The table name