Ejemplo n.º 1
0
 public function checkImportStructure(array $data)
 {
     parent::checkImportStructure($data);
     if (!isset($data['user'])) {
         throw new InvalidArgumentException('Argument "user" must be set.');
     } elseif (empty($data['user'])) {
         throw new InvalidArgumentException('Argument "user" can not be empty.');
     }
 }
Ejemplo n.º 2
0
 public function checkImportStructure(array $data)
 {
     parent::checkImportStructure($data);
     if (!isset($data['name'])) {
         throw new InvalidArgumentException('Argument "name" must be set.');
     } elseif (empty($data['name']) or !is_string($data['name'])) {
         throw new InvalidArgumentException('Argument "name" can not be empty and must be string.');
     }
 }