Esempio n. 1
0
 public function validateValues()
 {
     $return = array();
     // do we have any arguments at all?
     if (!$this->definition->testHasArgument()) {
         // no, so impossible to fail validation
         return $return;
     }
     // are all the arguments valid?
     foreach ($this->values as $value) {
         $errors = $this->definition->arg->testIsValid($value);
         if (count($errors) > 0) {
             $return = array_merge($return, $errors);
         }
     }
     // all done
     return $return;
 }