private function itterator(array $data)
    {
        foreach ($data as $item)
        {
            if (self::areArrayKeysInt($item))
            {
                $this->itterator($item);
            }

            $object = self::identifyObject($item);

            yield $this->{"parse$object"}($item);
        }
    }
private function itterator(array $data)
    {
        foreach ($data as $item)
        {
            if (self::areArrayKeysInt($item))
            {
                $this->itterator($item);
            }

            $object = self::identifyObject($item);

            yield $this->{"parse$object"}($item);
        }
    }
private function itterator ( array $ data ) { foreach ( $ data as $ item ) { if ( self :: areArrayKeysInt ( $ item ) ) { $ this -> itterator ( $ item ) ; } $ object = self :: identifyObject ( $ item ) ; yield $ this -> { "parse$object" } ( $ item ) ; } }
Generator function to itterate over an array from a file.
Individual items are identified and given to the appropriate parser.
The resulting object returned by the parser is yielded.

@param array $json
an array of items from the entire json file or a part of it

@return \Generator|GroupObject[]
Generator function to itterate over an array from a file . Individual items are identified and given to the appropriate parser . The resulting object returned by the parser is yielded .