* Returns the list of all attribute names of the model.
* The default implementation will return all column names of the table associated with this AR class.
* @return array list of attribute names.
*/
publicfunctionattributes()// TODO: refactor should be abstract in an ActiveRecord base class
{
returnarray();
}
/**
/**
* Returns the database connection used by this AR class.
* Returns the database connection used by this AR class.
* By default, the "redis" application component is used as the database connection.
* By default, the "redis" application component is used as the database connection.
...
@@ -119,7 +114,7 @@ abstract class ActiveRecord extends \yii\db\ActiveRecord
...
@@ -119,7 +114,7 @@ abstract class ActiveRecord extends \yii\db\ActiveRecord
*/
*/
publicstaticfunctiongetTableSchema()
publicstaticfunctiongetTableSchema()
{
{
thrownewNotSupportedException('getTableSchema() is not supported by redis ActiveRecord as there is no schema in redis DB. Schema is defined by AR class itself');
thrownewInvalidConfigException(__CLASS__.'::getTableSchema() needs to be overridden in subclasses and return a TableSchema.');
}
}
/**
/**
...
@@ -168,16 +163,17 @@ abstract class ActiveRecord extends \yii\db\ActiveRecord
...
@@ -168,16 +163,17 @@ abstract class ActiveRecord extends \yii\db\ActiveRecord