public function convertObjectsToIdentityArrays(array $array)
    {
        foreach ($array as $key => $value) {
            if (is_array($value)) {
                $array[$key] = $this->convertObjectsToIdentityArrays($value);
            } elseif (is_object($value) && $value instanceof \Traversable) {
                $array[$key] = $this->convertObjectsToIdentityArrays(iterator_to_array($value));
            } elseif (is_object($value)) {
                $array[$key] = $this->convertObjectToIdentityArray($value);
            }
        }
        return $array;
    }
public function convertObjectsToIdentityArrays(array $array)
    {
        foreach ($array as $key => $value) {
            if (is_array($value)) {
                $array[$key] = $this->convertObjectsToIdentityArrays($value);
            } elseif (is_object($value) && $value instanceof \Traversable) {
                $array[$key] = $this->convertObjectsToIdentityArrays(iterator_to_array($value));
            } elseif (is_object($value)) {
                $array[$key] = $this->convertObjectToIdentityArray($value);
            }
        }
        return $array;
    }
public function convertObjectsToIdentityArrays ( array $ array ) { foreach ( $ array as $ key => $ value ) { if ( is_array ( $ value ) ) { $ array [ $ key ] = $ this -> convertObjectsToIdentityArrays ( $ value ) ; } elseif ( is_object ( $ value ) && $ value instanceof \ Traversable ) { $ array [ $ key ] = $ this -> convertObjectsToIdentityArrays ( iterator_to_array ( $ value ) ) ; } elseif ( is_object ( $ value ) ) { $ array [ $ key ] = $ this -> convertObjectToIdentityArray ( $ value ) ; } } return $ array ; }
Recursively iterates through the given array and turns objects
into an arrays containing the identity of the domain object.

@param array $array The array to be iterated over
@return array The modified array without objects
@throws Exception\UnknownObjectException if array contains objects that are not known to the Persistence Manager
Recursively iterates through the given array and turns objects into an arrays containing the identity of the domain object .