PHP 클래스 Pop\Code\Generator\ClassGenerator

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

보호된 프로퍼티들

프로퍼티 타입 설명
$abstract boolean Class abstract flag
$docblock DocblockGenerator Docblock generator object
$indent string Class indent
$interface string Interface that is implemented
$methods array Array of method generator objects
$name string Class name
$namespace NamespaceGenerator Namespace generator object
$output string Class output
$parent string Parent class that is extended
$properties array Array of property generator objects

공개 메소드들

메소드 설명
__construct ( string $name, string $parent = null, string $interface = null, boolean $abstract = false ) : ClassGenerator Constructor
__toString ( ) : string Print method
addMethod ( MethodGenerator $method ) : ClassGenerator Add a class method
addProperty ( PropertyGenerator $property ) : ClassGenerator Add a class property
factory ( string $name, string $parent = null, string $interface = null, boolean $abstract = false ) : ClassGenerator Static method to instantiate the class generator object and return itself to facilitate chaining methods together.
getDocblock ( ) : DocblockGenerator Access the docblock generator object
getIndent ( ) : string Get the class indent
getInterface ( ) : string Get the class interface
getMethod ( mixed $method ) : MethodGenerator Get a method property
getMethods ( ) : array Get all methods
getName ( ) : string Get the class name
getNamespace ( ) : NamespaceGenerator Access the namespace generator object
getParent ( ) : string Get the class parent
getProperties ( ) : array Get all properties
getProperty ( mixed $property ) : PropertyGenerator Get a class property
isAbstract ( ) : boolean Get the class abstract flag
removeMethod ( mixed $method ) : ClassGenerator Remove a method property
removeProperty ( mixed $property ) : ClassGenerator Remove a class property
render ( boolean $ret = false ) : mixed Render method
setAbstract ( boolean $abstract = false ) : ClassGenerator Set the class abstract flag
setDocblock ( DocblockGenerator $docblock ) : ClassGenerator Set the docblock generator object
setIndent ( string $indent = null ) : ClassGenerator Set the class indent
setInterface ( string $interface = null ) : ClassGenerator Set the class interface
setName ( string $name ) : ClassGenerator Set the class name
setNamespace ( NamespaceGenerator $namespace ) : ClassGenerator Set the namespace generator object
setParent ( string $parent = null ) : ClassGenerator Set the class parent

보호된 메소드들

메소드 설명
formatMethods ( ) : string Method to format the methods
formatProperties ( ) : string Method to format the properties

메소드 상세

__construct() 공개 메소드

Instantiate the class generator object
public __construct ( string $name, string $parent = null, string $interface = null, boolean $abstract = false ) : ClassGenerator
$name string
$parent string
$interface string
$abstract boolean
리턴 ClassGenerator

__toString() 공개 메소드

Print method
public __toString ( ) : string
리턴 string

addMethod() 공개 메소드

Add a class method
public addMethod ( MethodGenerator $method ) : ClassGenerator
$method MethodGenerator
리턴 ClassGenerator

addProperty() 공개 메소드

Add a class property
public addProperty ( PropertyGenerator $property ) : ClassGenerator
$property PropertyGenerator
리턴 ClassGenerator

factory() 공개 정적인 메소드

Static method to instantiate the class generator object and return itself to facilitate chaining methods together.
public static factory ( string $name, string $parent = null, string $interface = null, boolean $abstract = false ) : ClassGenerator
$name string
$parent string
$interface string
$abstract boolean
리턴 ClassGenerator

formatMethods() 보호된 메소드

Method to format the methods
protected formatMethods ( ) : string
리턴 string

formatProperties() 보호된 메소드

Method to format the properties
protected formatProperties ( ) : string
리턴 string

getDocblock() 공개 메소드

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

getIndent() 공개 메소드

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

getInterface() 공개 메소드

Get the class interface
public getInterface ( ) : string
리턴 string

getMethod() 공개 메소드

Get a method property
public getMethod ( mixed $method ) : MethodGenerator
$method mixed
리턴 MethodGenerator

getMethods() 공개 메소드

Get all methods
public getMethods ( ) : array
리턴 array

getName() 공개 메소드

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

getNamespace() 공개 메소드

Access the namespace generator object
public getNamespace ( ) : NamespaceGenerator
리턴 NamespaceGenerator

getParent() 공개 메소드

Get the class parent
public getParent ( ) : string
리턴 string

getProperties() 공개 메소드

Get all properties
public getProperties ( ) : array
리턴 array

getProperty() 공개 메소드

Get a class property
public getProperty ( mixed $property ) : PropertyGenerator
$property mixed
리턴 PropertyGenerator

isAbstract() 공개 메소드

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

removeMethod() 공개 메소드

Remove a method property
public removeMethod ( mixed $method ) : ClassGenerator
$method mixed
리턴 ClassGenerator

removeProperty() 공개 메소드

Remove a class property
public removeProperty ( mixed $property ) : ClassGenerator
$property mixed
리턴 ClassGenerator

render() 공개 메소드

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

setAbstract() 공개 메소드

Set the class abstract flag
public setAbstract ( boolean $abstract = false ) : ClassGenerator
$abstract boolean
리턴 ClassGenerator

setDocblock() 공개 메소드

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

setIndent() 공개 메소드

Set the class indent
public setIndent ( string $indent = null ) : ClassGenerator
$indent string
리턴 ClassGenerator

setInterface() 공개 메소드

Set the class interface
public setInterface ( string $interface = null ) : ClassGenerator
$interface string
리턴 ClassGenerator

setName() 공개 메소드

Set the class name
public setName ( string $name ) : ClassGenerator
$name string
리턴 ClassGenerator

setNamespace() 공개 메소드

Set the namespace generator object
public setNamespace ( NamespaceGenerator $namespace ) : ClassGenerator
$namespace NamespaceGenerator
리턴 ClassGenerator

setParent() 공개 메소드

Set the class parent
public setParent ( string $parent = null ) : ClassGenerator
$parent string
리턴 ClassGenerator

프로퍼티 상세

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

Class abstract flag
protected bool $abstract
리턴 boolean

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

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

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

Class indent
protected string $indent
리턴 string

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

Interface that is implemented
protected string $interface
리턴 string

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

Array of method generator objects
protected array $methods
리턴 array

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

Class name
protected string $name
리턴 string

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

Namespace generator object
protected NamespaceGenerator,Pop\Code\Generator $namespace
리턴 NamespaceGenerator

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

Class output
protected string $output
리턴 string

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

Parent class that is extended
protected string $parent
리턴 string

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

Array of property generator objects
protected array $properties
리턴 array