private static function extractProperties(NodeInterface $node)
    {
        $class = new \ReflectionClass($node);

        foreach ($class->getProperties() as $property) {
            if (!$property->isPublic()) {
                $property->setAccessible(true);
            }

            $name = $property->getName();
            $value = $property->getValue($node);

            yield $name => $value;

            if (!$property->isPublic()) {
                $property->setAccessible(false);
            }
        }
    }
private static function extractProperties(NodeInterface $node)
    {
        $class = new \ReflectionClass($node);

        foreach ($class->getProperties() as $property) {
            if (!$property->isPublic()) {
                $property->setAccessible(true);
            }

            $name = $property->getName();
            $value = $property->getValue($node);

            yield $name => $value;

            if (!$property->isPublic()) {
                $property->setAccessible(false);
            }
        }
    }
private static function extractProperties ( NodeInterface $ node ) { $ class = new \ ReflectionClass ( $ node ) ; foreach ( $ class -> getProperties ( ) as $ property ) { if ( ! $ property -> isPublic ( ) ) { $ property -> setAccessible ( true ) ; } $ name = $ property -> getName ( ) ; $ value = $ property -> getValue ( $ node ) ; yield $ name => $ value ; if ( ! $ property -> isPublic ( ) ) { $ property -> setAccessible ( false ) ; } } }
Provides a generator that share the properties of the given node.

@param NodeInterface $node The node to use for the extraction.

@return \Generator A key value tuple.
Provides a generator that share the properties of the given node .