src/main/php/routing/api/Links.php
public function getIterator(): \Traversable
    {
        $result = [];
        foreach ($this->links as $link) {
            if (is_array($link)) {
                $result = array_merge($result, $link);
            } else {
                $result[] = $link;
            }
        }

        return new \ArrayIterator($result);
    }
public function getIterator(): \Traversable
    {
        $result = [];
        foreach ($this->links as $link) {
            if (is_array($link)) {
                $result = array_merge($result, $link);
            } else {
                $result[] = $link;
            }
        }

        return new \ArrayIterator($result);
    }
public function getIterator ( ) : \ Traversable { $ result = [ ] ; foreach ( $ this -> links as $ link ) { if ( is_array ( $ link ) ) { $ result = array_merge ( $ result , $ link ) ; } else { $ result [ ] = $ link ; } } return new \ ArrayIterator ( $ result ) ; }
allows to iterate over all resources

@return  \Traversable
allows to iterate over all resources