PHP 인터페이스 gossi\codegen\model\RoutineInterface

파일 보기 프로젝트 열기: gossi/php-code-generator 0 사용 예제들

공개 메소드들

메소드 설명
addParameter ( PhpParameter $parameter ) Adds a parameter
addSimpleDescParameter ( string $name, null | string $type = null, null | string $typeDescription = null, mixed $defaultValue = null ) A quick way to add a parameter with description which is created from the given parameters
addSimpleParameter ( string $name, null | string $type = null, mixed $defaultValue = null ) A quick way to add a parameter which is created from the given parameters
getBody ( ) : string Returns the body
getParameter ( string | integer $nameOrIndex ) : PhpParameter Returns a parameter by index or name
getParameters ( ) : array Returns a collection of parameters
hasParameter ( string $name ) : boolean Checks whether a parameter exists
isReferenceReturned ( ) : boolean Returns whether a reference is returned
removeParameter ( integer | string | PhpParameter $param ) Remove a parameter at a given position
replaceParameter ( integer $position, PhpParameter $parameter ) Replaces a parameter at a given position
setBody ( string $body ) Sets the body for this
setParameters ( array $parameters ) Sets a collection of parameters
setReferenceReturned ( boolean $bool ) Set true if a reference is returned of false if not

메소드 상세

addParameter() 공개 메소드

Adds a parameter
public addParameter ( PhpParameter $parameter )
$parameter PhpParameter

addSimpleDescParameter() 공개 메소드

A quick way to add a parameter with description which is created from the given parameters
public addSimpleDescParameter ( string $name, null | string $type = null, null | string $typeDescription = null, mixed $defaultValue = null )
$name string
$type null | string
$typeDescription null | string
$defaultValue mixed omit the argument to define no default value

addSimpleParameter() 공개 메소드

A quick way to add a parameter which is created from the given parameters
public addSimpleParameter ( string $name, null | string $type = null, mixed $defaultValue = null )
$name string
$type null | string
$defaultValue mixed omit the argument to define no default value

getBody() 공개 메소드

Returns the body
public getBody ( ) : string
리턴 string

getParameter() 공개 메소드

Returns a parameter by index or name
public getParameter ( string | integer $nameOrIndex ) : PhpParameter
$nameOrIndex string | integer
리턴 PhpParameter

getParameters() 공개 메소드

Returns a collection of parameters
public getParameters ( ) : array
리턴 array

hasParameter() 공개 메소드

Checks whether a parameter exists
public hasParameter ( string $name ) : boolean
$name string parameter name
리턴 boolean `true` if a parameter exists and `false` if not

isReferenceReturned() 공개 메소드

Returns whether a reference is returned
public isReferenceReturned ( ) : boolean
리턴 boolean

removeParameter() 공개 메소드

Remove a parameter at a given position
public removeParameter ( integer | string | PhpParameter $param )
$param integer | string | PhpParameter

replaceParameter() 공개 메소드

Replaces a parameter at a given position
public replaceParameter ( integer $position, PhpParameter $parameter )
$position integer
$parameter PhpParameter

setBody() 공개 메소드

Sets the body for this
public setBody ( string $body )
$body string

setParameters() 공개 메소드

Note: clears all parameters before setting the new ones
public setParameters ( array $parameters )
$parameters array

setReferenceReturned() 공개 메소드

Set true if a reference is returned of false if not
public setReferenceReturned ( boolean $bool )
$bool boolean