db\ActiveRecordInterface getAttribute()

getAttribute() public abstract method Returns the named attribute value. If this record is the result of a query and the attribute is not loaded, null will be returned. See also hasAttribute(). public abstract mixed getAttribute ( $name )$name string The attribute name return mixed The attribute value. null if the attribute is not set or does not exist.

db\ActiveRecordInterface findAll()

findAll() public abstract static method Returns a list of active record models that match the specified primary key value(s) or a set of column values. The method accepts: a scalar value (integer or string): query by a single primary key value and return an array containing the corresponding record (or an empty array if not found). a non-associative array: query by a list of primary key values and return the corresponding records (or an empty array if none was found). Note that an empty con

db\ActiveRecordInterface getDb()

getDb() public abstract static method Returns the connection used by this AR class. public abstract static mixed getDb ( )return mixed The database connection used by this AR class.

db\ActiveRecordInterface equals()

equals() public abstract method Returns a value indicating whether the given active record is the same as the current one. Two new records are considered to be not equal. public abstract boolean equals ( $record )$record static Record to compare to return boolean Whether the two active records refer to the same row in the same database table.

db\ActiveRecordInterface deleteAll()

deleteAll() public abstract static method Deletes records using the provided conditions. WARNING: If you do not specify any condition, this method will delete ALL rows in the table. For example, to delete all customers whose status is 3: Customer::deleteAll([status = 3]); public abstract static integer deleteAll ( $condition = null )$condition array The condition that matches the records that should get deleted. Please refer to yii\db\QueryInterface::where() on how to specify this param

db\ActiveRecordInterface find()

find() public abstract static method Creates an yii\db\ActiveQueryInterface instance for query purpose. The returned yii\db\ActiveQueryInterface instance can be further customized by calling methods defined in yii\db\ActiveQueryInterface before one() or all() is called to return populated ActiveRecord instances. For example, // find the customer whose ID is 1 $customer = Customer::find()->where(['id' => 1])->one(); // find all active customers and order them by their age: $custome

db\ActiveRecordInterface delete()

delete() public abstract method Deletes the record from the database. public abstract integer|boolean delete ( )return integer|boolean The number of rows deleted, or false if the deletion is unsuccessful for some reason. Note that it is possible that the number of rows deleted is 0, even though the deletion execution is successful.

db\ActiveRecordInterface attributes()

attributes() public abstract method Returns the list of all attribute names of the record. public abstract array attributes ( )return array List of attribute names.

db\ActiveRecord updateAllCounters()

updateAllCounters() public static method Updates the whole table using the provided counter changes and conditions. For example, to increment all customers' age by 1, Customer::updateAllCounters(['age' => 1]); public static integer updateAllCounters ( $counters, $condition = '', $params = [] )$counters array The counters to be updated (attribute name => increment value). Use negative values if you want to decrement the counters. $condition string|array The conditions that will

db\ActiveRecord update()

update() public method Saves the changes to this active record into the associated database table. This method performs the following steps in order: call beforeValidate() when $runValidation is true. If beforeValidate() returns false, the rest of the steps will be skipped; call afterValidate() when $runValidation is true. If validation failed, the rest of the steps will be skipped; call beforeSave(). If beforeSave() returns false, the rest of the steps will be skipped; save the record into