0 follower

Yii Framework 3.0 API Documentation

This is the Yii Framework API Documentation. Here you will find detailed information about all classes provided by the Framework. Below you find a list of the existing classes, interfaces, and traits, ordered by their fully qualified name (including the namespace). Each of them has a dedicated page which contains a description about the purpose of the class, a list of the available methods, properties and constants, and detailed description on how to use each of them.

On this page you find all the classes included in version 3.0 of the framework. You can use the dropdown menu on the top right to switch between versions.

You can search API documentation using the search form on the top. You can search for class names and also method and property names, e.g. ActiveRecord.save() or just .save() or ::save().

This page is also available in JSON format:
curl https://www.yiiframework.com/doc/api/3.0/active-record -H 'Accept: application/json'

Class Description
Yiisoft\ActiveRecord\AbstractActiveRecord ActiveRecord is the base class for classes representing relational data in terms of objects.
Yiisoft\ActiveRecord\ActiveQuery Represents a db query associated with an Active Record class.
Yiisoft\ActiveRecord\ActiveQueryInterface A common interface to be implemented by active record query classes.
Yiisoft\ActiveRecord\ActiveRecord Active Record class which implements {@see ActiveRecordInterface} interface with the minimum set of methods.
Yiisoft\ActiveRecord\ActiveRecordInterface
Yiisoft\ActiveRecord\Event\AbstractEvent Base class for events in Active Record models.
Yiisoft\ActiveRecord\Event\AfterCreateQuery Event triggered after the query has been created for the {@see ActiveRecordInterface} model.
Yiisoft\ActiveRecord\Event\AfterDelete Event triggered after the record has been deleted from the database.
Yiisoft\ActiveRecord\Event\AfterInsert Event triggered after the record has been inserted into the database.
Yiisoft\ActiveRecord\Event\AfterPopulate Event triggered after the model has been populated with data.
Yiisoft\ActiveRecord\Event\AfterSave Event triggered after the model has been saved to the database.
Yiisoft\ActiveRecord\Event\AfterUpdate Event triggered after the record has been updated in the database.
Yiisoft\ActiveRecord\Event\AfterUpsert Event triggered after the model has been upserted (inserted or updated).
Yiisoft\ActiveRecord\Event\BeforeCreateQuery Event triggered before creating the query for the {@see ActiveRecordInterface} model.
Yiisoft\ActiveRecord\Event\BeforeDelete Event triggered before the record is deleted from the database.
Yiisoft\ActiveRecord\Event\BeforeInsert Event triggered before a new record is inserted into the database.
Yiisoft\ActiveRecord\Event\BeforePopulate Event triggered before the model is populated with data.
Yiisoft\ActiveRecord\Event\BeforeSave Event triggered before the model is saved (inserted or updated) to the database.
Yiisoft\ActiveRecord\Event\BeforeUpdate Event triggered before the record is updated in the database.
Yiisoft\ActiveRecord\Event\BeforeUpsert Event triggered before the model is upserted (inserted or updated) in the database.
Yiisoft\ActiveRecord\Event\EventDispatcherProvider Provider of event dispatchers for target object class names.
Yiisoft\ActiveRecord\Event\Handler\AttributeHandlerProvider Abstract class for event handlers provider based on class attributes.
Yiisoft\ActiveRecord\Event\Handler\DefaultDateTimeOnInsert Attribute for setting default value of the date and time for properties before inserting a new record into the database. By default, it sets the current date and time to the created_at and updated_at properties.
Yiisoft\ActiveRecord\Event\Handler\DefaultValue Attribute for setting default value for properties of an Active Record model after it has been populated.
Yiisoft\ActiveRecord\Event\Handler\DefaultValueOnInsert Attribute for setting default value for properties before inserting a new record into the database.
Yiisoft\ActiveRecord\Event\Handler\SetDateTimeOnUpdate Attribute for setting value of the date and time for properties before updating an existing record in the database. By default, it sets the current date and time to the updated_at property.
Yiisoft\ActiveRecord\Event\Handler\SetValueOnUpdate Attribute for setting value for properties before updating an existing record in the database.
Yiisoft\ActiveRecord\Event\Handler\SoftDelete Attribute for implementing soft deletion in Active Record models. Instead of deleting records from the database, it sets a value of the date and time for properties to indicate that the record has been logically deleted.
Yiisoft\ActiveRecord\Internal\ArArrayHelper
Yiisoft\ActiveRecord\Internal\JoinsWithBuilder Builds {@see ActiveQueryInterface} instance joins added with *join* methods.
Yiisoft\ActiveRecord\Internal\JunctionRowsFinder
Yiisoft\ActiveRecord\Internal\ModelRelationFilter
Yiisoft\ActiveRecord\Internal\RelationPopulator
Yiisoft\ActiveRecord\Internal\TableNameAndAliasResolver
Yiisoft\ActiveRecord\Internal\Typecaster
Yiisoft\ActiveRecord\JoinWith
Yiisoft\ActiveRecord\NotFoundException Represents an exception thrown when a record is not found.
Yiisoft\ActiveRecord\OptimisticLockException Represents an exception caused by optimistic locking failure.
Yiisoft\ActiveRecord\OptimisticLockInterface The interface should be implemented by Active Record classes to support optimistic locking.
Yiisoft\ActiveRecord\Trait\ArrayAccessTrait Trait to implement {@see ArrayAccess} interface for ActiveRecord.
Yiisoft\ActiveRecord\Trait\ArrayIteratorTrait Trait to implement {@see IteratorAggregate} interface for ActiveRecord.
Yiisoft\ActiveRecord\Trait\ArrayableTrait Trait to implement {@see ArrayableInterface} interface for ActiveRecord.
Yiisoft\ActiveRecord\Trait\CustomConnectionTrait Trait to implement a custom connection name for ActiveRecord.
Yiisoft\ActiveRecord\Trait\CustomTableNameTrait Trait to implement a custom table name for ActiveRecord.
Yiisoft\ActiveRecord\Trait\EventsTrait Trait to implement event dispatching for ActiveRecord.
Yiisoft\ActiveRecord\Trait\FactoryTrait Trait to add factory support to ActiveRecord.
Yiisoft\ActiveRecord\Trait\MagicPropertiesTrait Trait to define magic methods to access values of an ActiveRecord instance.
Yiisoft\ActiveRecord\Trait\MagicRelationsTrait Trait to define {@see ActiveRecordInterface::relationQuery()} method to access relation queries of an ActiveRecord instance. Also, it defines {@see ActiveRecordInterface::relationNames()} method to get names of all relations defined in the ActiveRecord class.
Yiisoft\ActiveRecord\Trait\PrivatePropertiesTrait Trait to handle private properties in Active Record classes.
Yiisoft\ActiveRecord\Trait\RepositoryTrait Trait to support static methods {@see find()}, {@see findOne()}, {@see findAll()}, {@see findBySql()} to find records.
Yiisoft\ActiveRecord\UnknownPropertyException Represents an exception caused by accessing unknown object properties.