Authentication

Authorization Unlike Web applications, RESTful APIs are usually stateless, which means sessions or cookies should not be used. Therefore, each request should come with some sort of authentication credentials because the user authentication status may not be maintained by sessions or cookies. A common practice is to send a secret access token with each request to authenticate the user. Since an access token can be used to uniquely identify and authenticate a user, API requests should always be s

debug\panels\ProfilingPanel $name

$name public read-only property Name of the panel public string getName ( )

sphinx\Command addForeignKey()

addForeignKey() public method Creates a SQL command for adding a foreign key constraint to an existing table. The method will properly quote the table and column names. public $this addForeignKey ( $name, $table, $columns, $refTable, $refColumns, $delete = null, $update = null )$name string The name of the foreign key constraint. $table string The table that the foreign key constraint will be added to. $columns string|array The name of the column to that the constraint will be adde

helpers\BaseHtml addCssClass()

addCssClass() public static method Adds a CSS class (or several classes) to the specified options. If the CSS class is already in the options, it will not be added again. If class specification at given options is an array, and some class placed there with the named (string) key, overriding of such key will have no effect. For example: $options = ['class' => ['persistent' => 'initial']]; Html::addCssClass($options, ['persistent' => 'override']); var_dump($options['class']); // outp

Validating Input

Declaring Rules Ad Hoc Validation Creating Validators Client-Side Validation As a rule of thumb, you should never trust the data received from end users and should always validate it before putting it to good use. Given a model populated with user inputs, you can validate the inputs by calling the yii\base\Model::validate() method. The method will return a boolean value indicating whether the validation succeeded or not. If not, you may get the error messages from the yii\base\Model::$errors p

helpers\ReplaceArrayValue __construct()

__construct() public method Constructor. public void __construct ( $value )$value mixed Value used as replacement.

sphinx\MatchBuilder __construct()

__construct() public method Constructor. public void __construct ( $connection, $config = [] )$connection yii\sphinx\Connection The Sphinx connection. $config array Name-value pairs that will be used to initialize the object properties

mongodb\Migration endProfile()

endProfile() protected method (available since version 2.1.1) Marks the end of a code block for profiling. protected void endProfile ( $token )$token string Token for the code block.

sphinx\Schema initIndexesInfo()

initIndexesInfo() protected method Initializes information about name and type of all index in the Sphinx. protected void initIndexesInfo ( )

log\DbTarget export()

export() public method Stores log messages to DB. public void export ( )