PHP 클래스 Pop\Code\Generator\DocblockGenerator

저자: Nick Sagona, III ([email protected])
상속: implements Pop\Code\Generator\GeneratorInterface
파일 보기 프로젝트 열기: nicksagona/PopPHP 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$desc string Docblock description
$indent string Docblock indent
$output string Docblock output
$tags array Docblock tags

공개 메소드들

메소드 설명
__construct ( string $desc = null, string $indent = null ) : DocblockGenerator Constructor
__toString ( ) : string Print docblock
factory ( string $desc = null, string $indent = null ) : DocblockGenerator Static method to instantiate the docblock object and return itself to facilitate chaining methods together.
getDesc ( ) : string Get the docblock description
getIndent ( ) : string Get the docblock indent
getParam ( integer $index ) : array Get a param
getReturn ( ) : array Get the return
getTag ( string $name ) : string Get a tag
parse ( string $docblock, string $forceIndent = null ) : DocblockGenerator Static method to parse a docblock string and return a new docblock generator object.
render ( boolean $ret = false ) : mixed Render docblock
setDesc ( string $desc = null ) : DocblockGenerator Set the docblock description
setIndent ( string $indent = null ) : DocblockGenerator Set the docblock indent
setParam ( string $type, string $var = null, string $desc = null ) : DocblockGenerator Add a param tag
setParams ( array $params ) : DocblockGenerator Add a param tag
setReturn ( string $type, string $desc = null ) : DocblockGenerator Add a return tag
setTag ( string $name, string $desc = null ) : DocblockGenerator Add a basic tag
setTags ( array $tags ) : DocblockGenerator Add basic tags

보호된 메소드들

메소드 설명
formatTags ( ) : string Format the docblock tags
getParamLength ( ) : integer Get the longest param type length
getTagLength ( ) : integer Get the longest tag length

메소드 상세

__construct() 공개 메소드

Instantiate the docblock generator object
public __construct ( string $desc = null, string $indent = null ) : DocblockGenerator
$desc string
$indent string
리턴 DocblockGenerator

__toString() 공개 메소드

Print docblock
public __toString ( ) : string
리턴 string

factory() 공개 정적인 메소드

Static method to instantiate the docblock object and return itself to facilitate chaining methods together.
public static factory ( string $desc = null, string $indent = null ) : DocblockGenerator
$desc string
$indent string
리턴 DocblockGenerator

formatTags() 보호된 메소드

Format the docblock tags
protected formatTags ( ) : string
리턴 string

getDesc() 공개 메소드

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

getIndent() 공개 메소드

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

getParam() 공개 메소드

Get a param
public getParam ( integer $index ) : array
$index integer
리턴 array

getParamLength() 보호된 메소드

Get the longest param type length
protected getParamLength ( ) : integer
리턴 integer

getReturn() 공개 메소드

Get the return
public getReturn ( ) : array
리턴 array

getTag() 공개 메소드

Get a tag
public getTag ( string $name ) : string
$name string
리턴 string

getTagLength() 보호된 메소드

Get the longest tag length
protected getTagLength ( ) : integer
리턴 integer

parse() 공개 정적인 메소드

Static method to parse a docblock string and return a new docblock generator object.
public static parse ( string $docblock, string $forceIndent = null ) : DocblockGenerator
$docblock string
$forceIndent string
리턴 DocblockGenerator

render() 공개 메소드

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

setDesc() 공개 메소드

Set the docblock description
public setDesc ( string $desc = null ) : DocblockGenerator
$desc string
리턴 DocblockGenerator

setIndent() 공개 메소드

Set the docblock indent
public setIndent ( string $indent = null ) : DocblockGenerator
$indent string
리턴 DocblockGenerator

setParam() 공개 메소드

Add a param tag
public setParam ( string $type, string $var = null, string $desc = null ) : DocblockGenerator
$type string
$var string
$desc string
리턴 DocblockGenerator

setParams() 공개 메소드

Add a param tag
public setParams ( array $params ) : DocblockGenerator
$params array
리턴 DocblockGenerator

setReturn() 공개 메소드

Add a return tag
public setReturn ( string $type, string $desc = null ) : DocblockGenerator
$type string
$desc string
리턴 DocblockGenerator

setTag() 공개 메소드

Add a basic tag
public setTag ( string $name, string $desc = null ) : DocblockGenerator
$name string
$desc string
리턴 DocblockGenerator

setTags() 공개 메소드

Add basic tags
public setTags ( array $tags ) : DocblockGenerator
$tags array
리턴 DocblockGenerator

프로퍼티 상세

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

Docblock description
protected string $desc
리턴 string

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

Docblock indent
protected string $indent
리턴 string

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

Docblock output
protected string $output
리턴 string

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

Docblock tags
protected array $tags
리턴 array