PHP 클래스 Pop\Code\Generator\MethodGenerator

저자: Nick Sagona, III ([email protected])
파일 보기 프로젝트 열기: nicksagona/PopPHP 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$abstract boolean Method abstract flag
$arguments array Method arguments
$body string Method body
$docblock DocblockGenerator Docblock generator object
$final boolean Method final flag
$indent string Method indent
$interface boolean Method interface flag
$name string Method name
$output string Method output
$static boolean Method static flag
$visibility string Method visibility

공개 메소드들

메소드 설명
__construct ( string $name, string $visibility = 'public', boolean $static = false ) : MethodGenerator Constructor
__toString ( ) : string Print method
addArgument ( string $name, mixed $value = null, string $type = null ) : MethodGenerator Add a method argument
addArguments ( array $args ) : MethodGenerator Add method arguments
addParameter ( string $name, mixed $value = null, string $type = null ) : MethodGenerator Add a method argument (synonym method for convenience)
addParameters ( array $args ) : MethodGenerator Add method arguments (synonym method for convenience)
appendToBody ( string $body, boolean $newline = true ) : MethodGenerator Append to the method body
factory ( string $name, string $visibility = 'public', boolean $static = false ) : MethodGenerator Static method to instantiate the method generator object and return itself to facilitate chaining methods together.
getArgument ( string $name ) : array Get a method argument
getArguments ( ) : array Get the method arguments
getBody ( ) : string Get the method body
getDesc ( ) : string Get the method description
getDocblock ( ) : DocblockGenerator Access the docblock generator object
getIndent ( ) : string Get the method indent
getName ( ) : string Get the method name
getParameter ( string $name ) : array Get a method argument (synonym method for convenience)
getParameters ( ) : array Get the method arguments (synonym method for convenience)
getVisibility ( ) : string Get the method visibility
isAbstract ( ) : boolean Get the method abstract flag
isFinal ( ) : boolean Get the method final flag
isInterface ( ) : boolean Get the method interface flag
isStatic ( ) : boolean Get the method static flag
render ( boolean $ret = false ) : mixed Render method
setAbstract ( boolean $abstract = false ) : MethodGenerator Set the method abstract flag
setBody ( string $body, boolean $newline = true ) : MethodGenerator Set the method body
setDesc ( string $desc = null ) : MethodGenerator Set the method description
setDocblock ( DocblockGenerator $docblock ) : ClassGenerator Set the docblock generator object
setFinal ( boolean $final = false ) : MethodGenerator Set the method final flag
setIndent ( string $indent = null ) : MethodGenerator Set the method indent
setInterface ( boolean $interface = false ) : MethodGenerator Set the method interface flag
setName ( string $name ) : MethodGenerator Set the method name
setStatic ( boolean $static = false ) : MethodGenerator Set the method static flag
setVisibility ( string $visibility = 'public' ) : MethodGenerator Set the method visibility

보호된 메소드들

메소드 설명
formatArguments ( ) : string Method to format the arguments

메소드 상세

__construct() 공개 메소드

Instantiate the method generator object
public __construct ( string $name, string $visibility = 'public', boolean $static = false ) : MethodGenerator
$name string
$visibility string
$static boolean
리턴 MethodGenerator

__toString() 공개 메소드

Print method
public __toString ( ) : string
리턴 string

addArgument() 공개 메소드

Add a method argument
public addArgument ( string $name, mixed $value = null, string $type = null ) : MethodGenerator
$name string
$value mixed
$type string
리턴 MethodGenerator

addArguments() 공개 메소드

Add method arguments
public addArguments ( array $args ) : MethodGenerator
$args array
리턴 MethodGenerator

addParameter() 공개 메소드

Add a method argument (synonym method for convenience)
public addParameter ( string $name, mixed $value = null, string $type = null ) : MethodGenerator
$name string
$value mixed
$type string
리턴 MethodGenerator

addParameters() 공개 메소드

Add method arguments (synonym method for convenience)
public addParameters ( array $args ) : MethodGenerator
$args array
리턴 MethodGenerator

appendToBody() 공개 메소드

Append to the method body
public appendToBody ( string $body, boolean $newline = true ) : MethodGenerator
$body string
$newline boolean
리턴 MethodGenerator

factory() 공개 정적인 메소드

Static method to instantiate the method generator object and return itself to facilitate chaining methods together.
public static factory ( string $name, string $visibility = 'public', boolean $static = false ) : MethodGenerator
$name string
$visibility string
$static boolean
리턴 MethodGenerator

formatArguments() 보호된 메소드

Method to format the arguments
protected formatArguments ( ) : string
리턴 string

getArgument() 공개 메소드

Get a method argument
public getArgument ( string $name ) : array
$name string
리턴 array

getArguments() 공개 메소드

Get the method arguments
public getArguments ( ) : array
리턴 array

getBody() 공개 메소드

Get the method body
public getBody ( ) : string
리턴 string

getDesc() 공개 메소드

Get the method description
public getDesc ( ) : string
리턴 string

getDocblock() 공개 메소드

Access the docblock generator object
public getDocblock ( ) : DocblockGenerator
리턴 DocblockGenerator

getIndent() 공개 메소드

Get the method indent
public getIndent ( ) : string
리턴 string

getName() 공개 메소드

Get the method name
public getName ( ) : string
리턴 string

getParameter() 공개 메소드

Get a method argument (synonym method for convenience)
public getParameter ( string $name ) : array
$name string
리턴 array

getParameters() 공개 메소드

Get the method arguments (synonym method for convenience)
public getParameters ( ) : array
리턴 array

getVisibility() 공개 메소드

Get the method visibility
public getVisibility ( ) : string
리턴 string

isAbstract() 공개 메소드

Get the method abstract flag
public isAbstract ( ) : boolean
리턴 boolean

isFinal() 공개 메소드

Get the method final flag
public isFinal ( ) : boolean
리턴 boolean

isInterface() 공개 메소드

Get the method interface flag
public isInterface ( ) : boolean
리턴 boolean

isStatic() 공개 메소드

Get the method static flag
public isStatic ( ) : boolean
리턴 boolean

render() 공개 메소드

Render method
public render ( boolean $ret = false ) : mixed
$ret boolean
리턴 mixed

setAbstract() 공개 메소드

Set the method abstract flag
public setAbstract ( boolean $abstract = false ) : MethodGenerator
$abstract boolean
리턴 MethodGenerator

setBody() 공개 메소드

Set the method body
public setBody ( string $body, boolean $newline = true ) : MethodGenerator
$body string
$newline boolean
리턴 MethodGenerator

setDesc() 공개 메소드

Set the method description
public setDesc ( string $desc = null ) : MethodGenerator
$desc string
리턴 MethodGenerator

setDocblock() 공개 메소드

Set the docblock generator object
public setDocblock ( DocblockGenerator $docblock ) : ClassGenerator
$docblock DocblockGenerator
리턴 ClassGenerator

setFinal() 공개 메소드

Set the method final flag
public setFinal ( boolean $final = false ) : MethodGenerator
$final boolean
리턴 MethodGenerator

setIndent() 공개 메소드

Set the method indent
public setIndent ( string $indent = null ) : MethodGenerator
$indent string
리턴 MethodGenerator

setInterface() 공개 메소드

Set the method interface flag
public setInterface ( boolean $interface = false ) : MethodGenerator
$interface boolean
리턴 MethodGenerator

setName() 공개 메소드

Set the method name
public setName ( string $name ) : MethodGenerator
$name string
리턴 MethodGenerator

setStatic() 공개 메소드

Set the method static flag
public setStatic ( boolean $static = false ) : MethodGenerator
$static boolean
리턴 MethodGenerator

setVisibility() 공개 메소드

Set the method visibility
public setVisibility ( string $visibility = 'public' ) : MethodGenerator
$visibility string
리턴 MethodGenerator

프로퍼티 상세

$abstract 보호되어 있는 프로퍼티

Method abstract flag
protected bool $abstract
리턴 boolean

$arguments 보호되어 있는 프로퍼티

Method arguments
protected array $arguments
리턴 array

$body 보호되어 있는 프로퍼티

Method body
protected string $body
리턴 string

$docblock 보호되어 있는 프로퍼티

Docblock generator object
protected DocblockGenerator,Pop\Code\Generator $docblock
리턴 DocblockGenerator

$final 보호되어 있는 프로퍼티

Method final flag
protected bool $final
리턴 boolean

$indent 보호되어 있는 프로퍼티

Method indent
protected string $indent
리턴 string

$interface 보호되어 있는 프로퍼티

Method interface flag
protected bool $interface
리턴 boolean

$name 보호되어 있는 프로퍼티

Method name
protected string $name
리턴 string

$output 보호되어 있는 프로퍼티

Method output
protected string $output
리턴 string

$static 보호되어 있는 프로퍼티

Method static flag
protected bool $static
리턴 boolean

$visibility 보호되어 있는 프로퍼티

Method visibility
protected string $visibility
리턴 string