Skip to content
This repository was archived by the owner on Jun 24, 2025. It is now read-only.
This repository was archived by the owner on Jun 24, 2025. It is now read-only.

Retrieving Reflection of Generic Lines #75

@onet4

Description

@onet4

Hello, thanks for the great tool.

The basic concept is, that any reflection is possible to process the particular part of the token array describing the reflected element.

I could pull doc-block descriptions of a class like this.

$broker = new Broker(new Broker\Backend\Memory());
$broker->processDirectory( dirname( __FILE__ ) . '/project_x' );
$class = $broker->getClass( 'MyClassBase' );
$long_description = $class->getAnnotation(ReflectionAnnotation::LONG_DESCRIPTION);

I'm wondering if there is a way to retrieve doc-block contents of an arbitrary line of code. Say, there is a line which is neither a class, method, constant, nor function declaration and it is documented with the docblock format.

/**
 * This is for arbitrary contents.
 * 
 * Trying to see if custom doc-blocks can be included.
 * 
 * @package     CustomLine
 */
doAction( 'custom_line' );

When I print out the contents of $broker by doing like print_r( $broker, true );, I see the doc-block of such an above case is parsed and stored in the object. What I want to do is to list doc-block contents of generic lines which belong to a certain package or namespace. Is there a method like $broker->getMisc() or something?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions