yii\mongodb\file\ActiveRecord::attributes PHP 메소드

attributes() 공개 메소드

This method could be overridden by child classes to define available attributes. Note: all attributes defined in base Active Record class should be always present in returned array. For example: php public function attributes() { return array_merge( parent::attributes(), ['tags', 'status'] ); }
public attributes ( ) : array
리턴 array list of attribute names.
    public function attributes()
    {
        return ['_id', 'filename', 'uploadDate', 'length', 'chunkSize', 'md5', 'file', 'newFileContent'];
    }

Usage Example

예제 #1
0
 public function attributes()
 {
     return array_merge(parent::attributes(), ['ownerId', 'contentType']);
 }
All Usage Examples Of yii\mongodb\file\ActiveRecord::attributes