PhpProperty
class PhpProperty extends AbstractPhpMember implements ValueInterface
Represents a PHP property.
Traits
Constants
| VISIBILITY_PRIVATE |
Private visibility |
| VISIBILITY_PROTECTED |
Protected visibility |
| VISIBILITY_PUBLIC |
Public visibility |
Methods
Sets the description, which will also be used when generating a docblock
Sets the long description
Returns the parent structure to which this member belongs
Creates a new PHP property
Generates docblock based on provided information
Details
in AbstractModel at line line 19
string
getDescription()
Returns this description
in AbstractModel at line line 29
$this
setDescription(string|array $description)
Sets the description, which will also be used when generating a docblock
in DocblockPart at line line 24
$this
setDocblock(Docblock|string $doc)
Sets the docblock
in DocblockPart at line line 39
Docblock
getDocblock()
Returns the docblock
in LongDescriptionPart at line line 21
string
getLongDescription()
Returns the long description
in LongDescriptionPart at line line 31
$this
setLongDescription(string $longDescription)
Sets the long description
in NamePart at line line 22
$this
setName(string $name)
Sets the name
in NamePart at line line 33
string
getName()
Returns the name
in TypePart at line line 26
$this
setType(string $type, string $description = null)
Sets the type
in TypePart at line line 41
$this
setTypeDescription(string $description)
Sets the description for the type
in TypePart at line line 51
string
getType()
Returns the type
in TypePart at line line 60
string
getTypeDescription()
Returns the type description
in AbstractPhpMember at line line 73
__construct(string $name)
Creates a new member
in AbstractPhpMember at line line 87
$this
setVisibility(string $visibility)
Sets the members visibility
in AbstractPhpMember at line line 104
string
getVisibility()
Returns the visibility state of this member
in AbstractPhpMember at line line 114
$this
setStatic(bool $bool)
Sets whether or not this member is static
in AbstractPhpMember at line line 125
bool
isStatic()
Returns whether this member is static
in AbstractPhpMember at line line 136
$this
setParent(AbstractPhpStruct|null $parent)
Sets the parent structure to which this member belongs
in AbstractPhpMember at line line 147
AbstractPhpStruct
getParent()
Returns the parent structure to which this member belongs
in ValuePart at line line 32
$this
setDefaultValue(mixed $value)
deprecated
deprecated
in ValuePart at line line 40
$this
unsetDefaultValue()
deprecated
deprecated
in ValuePart at line line 48
mixed
getDefaultValue()
deprecated
deprecated
in ValuePart at line line 56
bool
hasDefaultValue()
deprecated
deprecated
in ValuePart at line line 82
$this
setValue(string|integer|float|bool|null|PhpConstant $value)
Sets the value
in ValuePart at line line 97
$this
unsetValue()
Unsets the value
in ValuePart at line line 109
string|integer|float|bool|null|PhpConstant
getValue()
Returns the value
in ValuePart at line line 118
bool
hasValue()
Checks whether a value or expression is set
in ValuePart at line line 127
bool
isExpression()
Returns whether an expression is set
in ValuePart at line line 137
$this
setExpression(string $expr)
Sets an expression
in ValuePart at line line 149
string
getExpression()
Returns the expression
in ValuePart at line line 158
$this
unsetExpression()
Unsets the expression
at line line 41
static PhpProperty
create(string $name)
Creates a new PHP property
at line line 48
$this
generateDocblock()
Generates docblock based on provided information