PHP Class gossi\codegen\model\PhpParameter

Author: Johannes M. Schmitt ([email protected])
Inheritance: extends AbstractModel, use trait gossi\codegen\model\parts\NameTrait, use trait gossi\codegen\model\parts\DefaultValueTrait, use trait gossi\codegen\model\parts\TypeTrait
Afficher le fichier Open project: gossi/php-code-generator Class Usage Examples

Méthodes publiques

Méthode Description
__construct ( string $name = null ) Creates a new PHP parameter
create ( string $name = null ) : static Creates a new PHP parameter.
fromReflection ( ReflectionParameter $ref ) : PhpParameter Creates a PHP parameter from reflection
getDocblockTag ( ) : gossi\docblock\tags\ParamTag Returns a docblock tag for this parameter
getTypeDescription ( ) : string Alias for getDescription()
isPassedByReference ( ) : boolean Returns whether this parameter is passed by reference
setPassedByReference ( boolean $bool ) Sets whether this parameter is passed by reference
setTypeDescription ( string $description ) Alias for setDescription()

Method Details

__construct() public méthode

Creates a new PHP parameter
public __construct ( string $name = null )
$name string the parameter name

create() public static méthode

Creates a new PHP parameter.
public static create ( string $name = null ) : static
$name string the parameter name
Résultat static

fromReflection() public static méthode

Creates a PHP parameter from reflection
Deprecation: will be removed in version 0.5
public static fromReflection ( ReflectionParameter $ref ) : PhpParameter
$ref ReflectionParameter
Résultat PhpParameter

getDocblockTag() public méthode

Returns a docblock tag for this parameter
public getDocblockTag ( ) : gossi\docblock\tags\ParamTag
Résultat gossi\docblock\tags\ParamTag

getTypeDescription() public méthode

Alias for getDescription()
public getTypeDescription ( ) : string
Résultat string

isPassedByReference() public méthode

Returns whether this parameter is passed by reference
public isPassedByReference ( ) : boolean
Résultat boolean `true` if passed by reference and `false` if not

setPassedByReference() public méthode

Sets whether this parameter is passed by reference
public setPassedByReference ( boolean $bool )
$bool boolean `true` if passed by reference and `false` if not

setTypeDescription() public méthode

Alias for setDescription()
public setTypeDescription ( string $description )
$description string