Provides structured data from PHP Documentor comments
Parser is implemented as state based parser using a state transisiton table consisting of transition rules for empty and non-empty lines.
Source for this file: /Reflection/src/doc_comment_parser.php
Version: | //autogen// |
ANNOTATIONS
= 2
|
|
BEGINNING
= 10
|
|
LONG_DESC
= 1
|
|
SHORT_DESC
= 0
|
protected ezcReflectionAnnotation[] |
$annotations
|
protected string |
$docComment
|
protected ezcReflectionAnnotation |
$lastAnnotation
= null
|
protected string |
$longDesc
|
protected string |
$shortDesc
|
protected int |
$state
= self::BEGINNING
|
protected array(int=>int) |
$stateTable
= array(
|
public ezcReflectionDocCommentParserImpl |
__construct(
)
Constructs an instance of ezcReflectionDocCommentParserImpl |
protected string |
extractContentFromDocCommentLine(
$line
)
|
public ezcReflectionAnnotation[] |
getAnnotations(
)
|
public ezcReflectionAnnotation[] |
getAnnotationsByName(
$name
)
Returns an array of annotations with a given name |
public string |
getLongDescription(
)
Returns the long description from the source code documentation |
public ezcReflectionAnnotationParam[] |
getParamAnnotations(
)
|
public ezcReflectionAnnotationReturn[] |
getReturnAnnotations(
)
Return an array of return annotations |
public string |
getShortDescription(
)
Returns the short description from the source code documentation |
public ezcReflectionAnnotationVar[] |
getVarAnnotations(
)
|
public boolean |
hasAnnotation(
$with
)
Checks whether a annotation is used |
public void |
parse(
$docComment
)
Initialize parsing of the given documentation fragment. |
protected void |
parseAnnotation(
$line
)
|
Constructs an instance of ezcReflectionDocCommentParserImpl
Name | Type | Description |
---|---|---|
$line |
string |
Method | Description |
---|---|
ezcReflectionDocCommentParser::getAnnotations() |
Retrieve all found annotations |
Returns an array of annotations with a given name
Name | Type | Description |
---|---|---|
$name |
string |
Method | Description |
---|---|
ezcReflectionDocCommentParser::getAnnotationsByName() |
Return all found annotations with the given name. |
Returns the long description from the source code documentation
Method | Description |
---|---|
ezcReflectionDocCommentParser::getLongDescription() |
Returns long description |
Method | Description |
---|---|
ezcReflectionDocCommentParser::getParamAnnotations() |
Retrieve all param annotations |
Return an array of return annotations
Method | Description |
---|---|
ezcReflectionDocCommentParser::getReturnAnnotations() |
Retrieve all return annotations |
Returns the short description from the source code documentation
Method | Description |
---|---|
ezcReflectionDocCommentParser::getShortDescription() |
Returns short description |
Method | Description |
---|---|
ezcReflectionDocCommentParser::getVarAnnotations() |
Retrieve all var annotations |
Checks whether a annotation is used
Name | Type | Description |
---|---|---|
$with |
string | name of used annotation |
Method | Description |
---|---|
ezcReflectionDocCommentParser::hasAnnotation() |
Checks whether an annotation was used in the parsed documentation fragment |
Initialize parsing of the given documentation fragment.
Results can be retrieved after completion by the getters provided.
Name | Type | Description |
---|---|---|
$docComment |
string |
Method | Description |
---|---|
ezcReflectionDocCommentParser::parse() |
Initialize parsing of the given documentation fragment. |
Name | Type | Description |
---|---|---|
$line |
string |