/** * Fügt allen Feldern eine bestimmte Rule zurück * * @param style bestimmt die Position der Rule (append oder prepend) */ public function addRuleToAll(ValidatorRule $rule, $position = self::APPEND) { if ($position == self::APPEND) { foreach ($this->rules as $key => $NULL) { array_push($this->rules[$key], $rule); } } if ($position == self::PREPEND) { foreach ($this->rules as $key => $NULL) { array_unshift($this->rules[$key], $rule); } } if (is_numeric($position)) { foreach ($this->rules as $key => $NULL) { A::insert($this->rules[$key], $rule, (int) $position); } } throw new \Psc\Exception('unbekanter Parameter für position: ' . Code::getInfo($position)); }