mongosoft\file\UploadBehavior::init PHP Метод

init() публичный Метод

public init ( )
    public function init()
    {
        parent::init();
        if ($this->attribute === null) {
            throw new InvalidConfigException('The "attribute" property must be set.');
        }
        if ($this->path === null) {
            throw new InvalidConfigException('The "path" property must be set.');
        }
        if ($this->url === null) {
            throw new InvalidConfigException('The "url" property must be set.');
        }
    }

Usage Example

 /**
  * @inheritdoc
  */
 public function init()
 {
     parent::init();
     if ($this->crop_field === null xor $this->cropped_field === null) {
         throw new InvalidConfigException('The crop_field and cropped_field properties must be both filled or both unfilled.');
     }
 }
All Usage Examples Of mongosoft\file\UploadBehavior::init