Webiny\Component\Entity\Attribute\Validation\ValidationException::getIterator PHP Method

getIterator() public method

Retrieve an external iterator
public getIterator ( ) : Traversable
return Traversable An instance of an object implementing Iterator or Traversable
    public function getIterator()
    {
        if (!count($this->errors)) {
            $this->errors[$this->attribute] = $this->getMessage();
        }
        return new \ArrayIterator($this->errors);
    }