public function toArray() { if (!$this->hasParam('buckets_path')) { throw new InvalidException('Buckets path is required'); } return parent::toArray(); }