Parser
Parses doc comments
Constructors / Destructors
Returns | Signature and Description |
---|---|
void | __construct ( )Creates a new Parser. |
Instance Methods
Returns | Signature and Description |
---|---|
Block | parse ( )Parses a doc comment. |
Block | parseString ( , )Parses a doc comment string. |
Returns | Signature and Description |
---|---|
string | extract ( )Extract the content from the comment. |
Method Details
__construct
public function
__construct
(?
TagFactory
$tagFactory = null
)Creates a new Parser.
Name | Type | Description |
---|---|---|
$tagFactory | ? TagFactory | Optional. The factory to use. |
extract
protected function
extract
(string
$comment
)Extract the content from the comment.
Name | Type | Description |
---|---|---|
$comment | string | The comment to clean up |
Type | Description |
---|---|
string | The extracted content |
parse
public function
parse
(?
ScannedBase
$token
)Parses a doc comment.
Name | Type | Description |
---|---|---|
$token | ? ScannedBase | The token whose doc comment will be evaluated |
Type | Description |
---|---|
Block | The parsed block |
parseString
public function
parseString
(?
string
$comment
, ?
ScannedBase
$token = null
)Parses a doc comment string.
Name | Type | Description |
---|---|---|
$comment | ? string | The doc comment |
$token | ? ScannedBase | The token whose doc comment will be evaluated |
Type | Description |
---|---|
Block | The parsed block |