PropertyDeclaration
A declared class property.
- Copyright
- 2016 Appertly
- License
- Apache-2.0
Constructors / Destructors
| Returns | Signature and Description |
|---|---|
void | __construct(, , )Creates a new PropertyDeclaration. |
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. |
ScannedProperty | getToken()Gets the scanned token. |
ConstVector<?ScannedTypehint> | getTypes()Gets the best type hints for the property. |
Method Details
__construct
__construct(ScannedProperty $property, ScannedClass $class, Block $block)Creates a new PropertyDeclaration.
| Name | Type | Description |
|---|---|---|
$property | ScannedProperty | The property |
$class | ScannedClass | The interface, trait, or class |
$block | Block | The doc comment |
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 |
|---|---|
ScannedProperty | The scanned token |
getTypes
getTypes()Gets the best type hints for the property.
Either the inline typehint, or if omitted or mixed, we use the tags.
| Type | Description |
|---|---|
ConstVector<?ScannedTypehint> | The type hints |