mongodb\ActiveRecord attributes()

attributes() public method

Returns the list of all attribute names of the model.

This method must be overridden by child classes to define available attributes. Note: primary key attribute "_id" should be always present in returned array. For example:

public function attributes()
{
    return ['_id', 'name', 'address', 'status'];
}
public array attributes ( )
return array

List of attribute names.

throws yii\base\InvalidConfigException

if not implemented

doc_Yii
2016-10-30 17:07:24
Comments
Leave a Comment

Please login to continue.