protected function parseProperty(ClassBuilder $classBuilder, NodeStream $stream)
    {
        $builder = new PropertyBuilder();
        $comments = array();

        $propertyNodes = array(
            TokenParser::NODE_PUBLIC_PROPERTY => 'public',
            TokenParser::NODE_PROTECTED_PROPERTY => 'protected',
            TokenParser::NODE_PRIVATE_PROPERTY => 'private'
        );

        $node = $stream->expect(array_keys($propertyNodes));
        $builder->setName($node->getValue());
        $builder->setVisibility($propertyNodes[$node->getType()]);

        if ($stream->is(TokenParser::NODE_PROPERTY_TYPE)) {
            $builder->setType($stream->current()->getValue());
            $stream->next();
        }

        while ($stream->is(TokenParser::NODE_ACCESSOR)) {
            $builder->addAccessor($stream->current()->getValue());
            $stream->next();
        }

        while ($stream->is(TokenParser::NODE_PROPERTY_COMMENT)) {
            $comments[] = $stream->current()->getValue();
            $stream->next();
        }

        if (count($comments) > 0) {
            $builder->setComments($comments);
        }

        $classBuilder->addProperty($builder);
    }
protected function parseProperty(ClassBuilder $classBuilder, NodeStream $stream)
    {
        $builder = new PropertyBuilder();
        $comments = array();

        $propertyNodes = array(
            TokenParser::NODE_PUBLIC_PROPERTY => 'public',
            TokenParser::NODE_PROTECTED_PROPERTY => 'protected',
            TokenParser::NODE_PRIVATE_PROPERTY => 'private'
        );

        $node = $stream->expect(array_keys($propertyNodes));
        $builder->setName($node->getValue());
        $builder->setVisibility($propertyNodes[$node->getType()]);

        if ($stream->is(TokenParser::NODE_PROPERTY_TYPE)) {
            $builder->setType($stream->current()->getValue());
            $stream->next();
        }

        while ($stream->is(TokenParser::NODE_ACCESSOR)) {
            $builder->addAccessor($stream->current()->getValue());
            $stream->next();
        }

        while ($stream->is(TokenParser::NODE_PROPERTY_COMMENT)) {
            $comments[] = $stream->current()->getValue();
            $stream->next();
        }

        if (count($comments) > 0) {
            $builder->setComments($comments);
        }

        $classBuilder->addProperty($builder);
    }
protected function parseProperty ( ClassBuilder $ classBuilder , NodeStream $ stream ) { $ builder = new PropertyBuilder ( ) ; $ comments = array ( ) ; $ propertyNodes = array ( TokenParser :: NODE_PUBLIC_PROPERTY => 'public' , TokenParser :: NODE_PROTECTED_PROPERTY => 'protected' , TokenParser :: NODE_PRIVATE_PROPERTY => 'private' ) ; $ node = $ stream -> expect ( array_keys ( $ propertyNodes ) ) ; $ builder -> setName ( $ node -> getValue ( ) ) ; $ builder -> setVisibility ( $ propertyNodes [ $ node -> getType ( ) ] ) ; if ( $ stream -> is ( TokenParser :: NODE_PROPERTY_TYPE ) ) { $ builder -> setType ( $ stream -> current ( ) -> getValue ( ) ) ; $ stream -> next ( ) ; } while ( $ stream -> is ( TokenParser :: NODE_ACCESSOR ) ) { $ builder -> addAccessor ( $ stream -> current ( ) -> getValue ( ) ) ; $ stream -> next ( ) ; } while ( $ stream -> is ( TokenParser :: NODE_PROPERTY_COMMENT ) ) { $ comments [ ] = $ stream -> current ( ) -> getValue ( ) ; $ stream -> next ( ) ; } if ( count ( $ comments ) > 0 ) { $ builder -> setComments ( $ comments ) ; } $ classBuilder -> addProperty ( $ builder ) ; }
Parses property nodes

@param ClassBuilder $classBuilder ClassBuilder object
@param NodeStream   $stream       NodeStream object
Parses property nodes