public function getIterator() { $rules = $this->rules; if ($this->required) { array_unshift($rules, $this->required); } return new \ArrayIterator($rules); }