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
Datei anzeigen Open project: gossi/php-code-generator Class Usage Examples

Public Methods

Method 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 method

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

create() public static method

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

fromReflection() public static method

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

getDocblockTag() public method

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

getTypeDescription() public method

Alias for getDescription()
public getTypeDescription ( ) : string
return string

isPassedByReference() public method

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

setPassedByReference() public method

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 method

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