private function addMissingNodeProperties($node, $options, $nodeMap, $graph, &$result, $path)
    {
        foreach ($node as $property => $value) {
            if (property_exists($result, $property)) {
                continue; // property has already been added
            }

            if (true === $options->{'@embedChildren'}) {
                if (false === is_array($value)) {
                    $result->{$property} = unserialize(serialize($value));  // create a deep-copy
                    continue;
                }

                $result->{$property} = array();
                foreach ($value as $item) {
                    if (is_object($item)) {
                        if (property_exists($item, '@id')) {
                            $item = $nodeMap->{'-' . $graph}->{'-' . $item->{'@id'}};
                        }

                        $this->nodeMatchesFrame($item, null, $options, $nodeMap, $graph, $result->{$property}, $path);
                    } else {
                        $result->{$property}[] = $item;
                    }
                }

            } else {
                // TODO Perform deep object copy??
                $result->{$property} = unserialize(serialize($value));  // create a deep-copy
            }
        }
    }
private function addMissingNodeProperties($node, $options, $nodeMap, $graph, &$result, $path)
    {
        foreach ($node as $property => $value) {
            if (property_exists($result, $property)) {
                continue; // property has already been added
            }

            if (true === $options->{'@embedChildren'}) {
                if (false === is_array($value)) {
                    $result->{$property} = unserialize(serialize($value));  // create a deep-copy
                    continue;
                }

                $result->{$property} = array();
                foreach ($value as $item) {
                    if (is_object($item)) {
                        if (property_exists($item, '@id')) {
                            $item = $nodeMap->{'-' . $graph}->{'-' . $item->{'@id'}};
                        }

                        $this->nodeMatchesFrame($item, null, $options, $nodeMap, $graph, $result->{$property}, $path);
                    } else {
                        $result->{$property}[] = $item;
                    }
                }

            } else {
                // TODO Perform deep object copy??
                $result->{$property} = unserialize(serialize($value));  // create a deep-copy
            }
        }
    }
private function addMissingNodeProperties ( $ node , $ options , $ nodeMap , $ graph , & $ result , $ path ) { foreach ( $ node as $ property => $ value ) { if ( property_exists ( $ result , $ property ) ) { continue ; // property has already been added } if ( true === $ options -> { '@embedChildren' } ) { if ( false === is_array ( $ value ) ) { $ result -> { $ property } = unserialize ( serialize ( $ value ) ) ; // create a deep-copy continue ; } $ result -> { $ property } = array ( ) ; foreach ( $ value as $ item ) { if ( is_object ( $ item ) ) { if ( property_exists ( $ item , '@id' ) ) { $ item = $ nodeMap -> { '-' . $ graph } -> { '-' . $ item -> { '@id' } } ; } $ this -> nodeMatchesFrame ( $ item , null , $ options , $ nodeMap , $ graph , $ result -> { $ property } , $ path ) ; } else { $ result -> { $ property } [ ] = $ item ; } } } else { // TODO Perform deep object copy?? $ result -> { $ property } = unserialize ( serialize ( $ value ) ) ; // create a deep-copy } } }
Adds all properties from node to result if they haven't been added yet

@param JsonObject $node    The node whose properties should processed.
@param JsonObject $options The current framing options.
@param JsonObject $nodeMap The node map.
@param string     $graph   The currently used graph.
@param JsonObject $result  The object to which the properties should be added.
@param array      $path    The path of already processed nodes.
Adds all properties from node to result if they haven t been added yet