/** * {@inheritdoc} */ protected function validateSelf() { parent::validateSelf(); if (empty($this->msg)) { throw new InvalidArgumentException('msg must be set.'); } }
/** * {@inheritdoc} */ protected function validateSelf() { parent::validateSelf(); foreach ($this->properties as $prop) { if (empty($this->{$prop})) { throw new InvalidArgumentException("{$prop} can not be null"); } } }