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