PHP Trait gossi\codegen\model\parts\ValuePart

For all models that have a value (or expression)
Author: Thomas Gossmann
Afficher le fichier Open project: gossi/php-code-generator

Méthodes publiques

Méthode Description
getDefaultValue ( ) : mixed
getExpression ( ) : string Returns the expression
getValue ( ) : string | integer | float | boolean | null | PhpConstant Returns the value
hasDefaultValue ( ) : boolean
hasValue ( ) : boolean Checks whether a value or expression is set
isExpression ( ) : boolean Returns whether an expression is set
setDefaultValue ( mixed $value )
setExpression ( string $expr ) Sets an expression
setValue ( string | integer | float | boolean | null | PhpConstant $value ) Sets the value
unsetDefaultValue ( )
unsetExpression ( ) Unsets the expression
unsetValue ( ) Unsets the value

Private Methods

Méthode Description
isPrimitive ( mixed $value ) : boolean Returns whether the given value is a primitive

Method Details

getDefaultValue() public méthode

Deprecation: use `getValue()` instead
public getDefaultValue ( ) : mixed
Résultat mixed

getExpression() public méthode

Returns the expression
public getExpression ( ) : string
Résultat string

getValue() public méthode

Returns the value
public getValue ( ) : string | integer | float | boolean | null | PhpConstant
Résultat string | integer | float | boolean | null | gossi\codegen\model\PhpConstant

hasDefaultValue() public méthode

Deprecation: use `hasValue()` instead
public hasDefaultValue ( ) : boolean
Résultat boolean

hasValue() public méthode

Checks whether a value or expression is set
public hasValue ( ) : boolean
Résultat boolean

isExpression() public méthode

Returns whether an expression is set
public isExpression ( ) : boolean
Résultat boolean

setDefaultValue() public méthode

Deprecation: use `setValue()` instead
public setDefaultValue ( mixed $value )
$value mixed

setExpression() public méthode

Sets an expression
public setExpression ( string $expr )
$expr string

setValue() public méthode

Sets the value
public setValue ( string | integer | float | boolean | null | PhpConstant $value )
$value string | integer | float | boolean | null | gossi\codegen\model\PhpConstant

unsetDefaultValue() public méthode

Deprecation: use `unsetValue()` instead
public unsetDefaultValue ( )

unsetExpression() public méthode

Unsets the expression
public unsetExpression ( )

unsetValue() public méthode

Unsets the value
public unsetValue ( )