PhpParameter
class PhpParameter extends AbstractModel implements ValueInterface
Represents a PHP parameter.
Traits
Methods
Sets the description, which will also be used when generating a docblock
Alias for setDescription()
Alias for getDescription()
Creates a new PHP parameter.
Creates a new PHP parameter
Sets whether this parameter is passed by reference
Returns whether this parameter is passed by reference
Returns a docblock tag for this parameter
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 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
at line line 150
$this
setTypeDescription(string $description)
Alias for setDescription()
in TypePart at line line 51
string
getType()
Returns the type
at line line 160
string
getTypeDescription()
Alias for getDescription()
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 45
static PhpParameter
create(string $name = null)
Creates a new PHP parameter.
at line line 56
static PhpParameter
fromReflection(ReflectionParameter $ref)
deprecated
deprecated
Creates a PHP parameter from reflection
at line line 106
__construct(string $name = null)
Creates a new PHP parameter
at line line 116
$this
setPassedByReference(bool $bool)
Sets whether this parameter is passed by reference
at line line 127
bool
isPassedByReference()
Returns whether this parameter is passed by reference
at line line 136
ParamTag
getDocblockTag()
Returns a docblock tag for this parameter