TypeConstantDeclaration
A declared class type constant.
- Copyright
- 2016 Appertly
- License
- Apache-2.0
Constructors / Destructors
Returns | Signature and Description |
---|---|
void | __construct ( , , )Creates a new ConstantDeclaration. |
Instance Methods
Returns | Signature and Description |
---|---|
? ScannedClass | getClass ()Gets the containing class. |
Block | Gets the doc comment block. |
string | Gets the source filename. |
string | getName ()Gets the name of the declaration. |
string | Gets the best summary for the property. |
ScannedTypeConstant | getToken ()Gets the scanned token. |
? ScannedTypehint | getType ()Gets the best type hints for the property. |
Method Details
__construct
__construct
(ScannedTypeConstant
$constant
, Block
$block
, ?
ScannedClass
$class = null
)Creates a new ConstantDeclaration.
Name | Type | Description |
---|---|---|
$constant | ScannedTypeConstant | The property |
$block | Block | The doc comment |
$class | ? ScannedClass | Optional. The interface, trait, or class |
getClass
getClass
()Gets the containing class.
Type | Description |
---|---|
? ScannedClass | The containing class |
getDocBlock
getDocBlock
()Gets the doc comment block.
Type | Description |
---|---|
Block | The doc block, which could be empty |
getFilename
getFilename
()Gets the source filename.
Type | Description |
---|---|
string | The filename |
getName
getName
()Gets the name of the declaration.
Type | Description |
---|---|
string | The declaration name |
getSummary
getSummary
()Gets the best summary for the property.
Either the PHPDoc summary, or the description of its var
tag.
Type | Description |
---|---|
string | The summary |
getToken
getToken
()Gets the scanned token.
Type | Description |
---|---|
ScannedTypeConstant | The scanned token |
getType
getType
()Gets the best type hints for the property.
Either the inline typehint, or if omitted or mixed
, we use the tags.
Type | Description |
---|---|
? ScannedTypehint | The type hints |