protected function convertObjectsToHashes(array $routeValues)
    {
        foreach ($routeValues as &$value) {
            if (is_object($value)) {
                if ($value instanceof CacheAwareInterface) {
                    $identifier = $value->getCacheEntryIdentifier();
                } else {
                    $identifier = $this->persistenceManager->getIdentifierByObject($value);
                }
                if ($identifier === null) {
                    return null;
                }
                $value = $identifier;
            } elseif (is_array($value)) {
                $value = $this->convertObjectsToHashes($value);
                if ($value === null) {
                    return null;
                }
            }
        }
        return $routeValues;
    }
protected function convertObjectsToHashes(array $routeValues)
    {
        foreach ($routeValues as &$value) {
            if (is_object($value)) {
                if ($value instanceof CacheAwareInterface) {
                    $identifier = $value->getCacheEntryIdentifier();
                } else {
                    $identifier = $this->persistenceManager->getIdentifierByObject($value);
                }
                if ($identifier === null) {
                    return null;
                }
                $value = $identifier;
            } elseif (is_array($value)) {
                $value = $this->convertObjectsToHashes($value);
                if ($value === null) {
                    return null;
                }
            }
        }
        return $routeValues;
    }
protected function convertObjectsToHashes ( array $ routeValues ) { foreach ( $ routeValues as & $ value ) { if ( is_object ( $ value ) ) { if ( $ value instanceof CacheAwareInterface ) { $ identifier = $ value -> getCacheEntryIdentifier ( ) ; } else { $ identifier = $ this -> persistenceManager -> getIdentifierByObject ( $ value ) ; } if ( $ identifier === null ) { return null ; } $ value = $ identifier ; } elseif ( is_array ( $ value ) ) { $ value = $ this -> convertObjectsToHashes ( $ value ) ; if ( $ value === null ) { return null ; } } } return $ routeValues ; }
Recursively converts objects in an array to their identifiers

@param array $routeValues the array to be processed
@return array the modified array or NULL if $routeValues contain an object and its identifier could not be determined
Recursively converts objects in an array to their identifiers