libSmalldb
v2.0.2
|
Write PHP files in a convenient way.
Public Member Functions | |
__construct () | |
PhpFileWriter constructor. More... | |
write (string $filename) | |
getPhpCode () | |
getParamAsCode (\ReflectionParameter $param) | |
getTypeAsCode (?\ReflectionType $typeReflection) | |
getParamCode (?\ReflectionType $type, string $name) | |
getMethodParametersCode (\ReflectionMethod $method) | |
useClasses (array $fqcnList) | |
useClass (string $fqcn, ?string $useAlias=null) | |
getIdentifier (string $name, string $suffix=null) | |
writeString (string $string='',... $args) | |
writeln (string $string='',... $args) | |
eof () | |
setFileHeader (string $generator_name) | |
beginBlock (string $statement='',... $args) | |
midBlock (string $statement,... $args) | |
endBlock (string $suffix='',... $args) | |
comment (string $comment) | |
docComment (string $comment) | |
setClassName (string $className) | |
setNamespace (string $namespace) | |
beginClass (string $classname, ?string $extends=null, array $implements=[]) | |
beginAbstractClass (string $classname, ?string $extends=null, array $implements=[]) | |
endClass () | |
beginInterface (string $classname, array $extends=[]) | |
endInterface () | |
beginTrait (string $classname) | |
endTrait () | |
beginMethodOverride (\ReflectionMethod $parentMethod, array & $parentCallArgs=null) | |
beginMethod (string $name, array $args=[], string $returnType='') | |
beginProtectedMethod (string $name, array $args=[], string $returnType='') | |
beginPrivateMethod (string $name, array $args=[], string $returnType='') | |
beginFinalMethod (string $name, array $args=[], string $returnType='') | |
beginStaticMethod (string $name, array $args=[], string $returnType='') | |
endMethod () | |
writeAbstractMethod (string $name, array $args=[], string $returnType='') | |
writeInterfaceMethod (string $name, array $args=[], string $returnType='') | |
hasMethod (string $methodName) | |
Static Public Member Functions | |
static | toCamelCase (string $identifier) |
static | getShortClassName (string $fqcn) |
static | getClassNamespace (string $fqcn) |
__construct | ( | ) |
PhpFileWriter constructor.
write | ( | string | $filename | ) |
getPhpCode | ( | ) |
getParamAsCode | ( | \ReflectionParameter | $param | ) |
getTypeAsCode | ( | ?\ReflectionType | $typeReflection | ) |
getParamCode | ( | ?\ReflectionType | $type, |
string | $name | ||
) |
getMethodParametersCode | ( | \ReflectionMethod | $method | ) |
|
static |
|
static |
|
static |
useClasses | ( | array | $fqcnList | ) |
useClass | ( | string | $fqcn, |
?string | $useAlias = null |
||
) |
getIdentifier | ( | string | $name, |
string | $suffix = null |
||
) |
writeString | ( | string | $string = '' , |
$args | |||
) |
writeln | ( | string | $string = '' , |
$args | |||
) |
eof | ( | ) |
setFileHeader | ( | string | $generator_name | ) |
beginBlock | ( | string | $statement = '' , |
$args | |||
) |
midBlock | ( | string | $statement, |
$args | |||
) |
endBlock | ( | string | $suffix = '' , |
$args | |||
) |
comment | ( | string | $comment | ) |
docComment | ( | string | $comment | ) |
setClassName | ( | string | $className | ) |
setNamespace | ( | string | $namespace | ) |
beginClass | ( | string | $classname, |
?string | $extends = null , |
||
array | $implements = [] |
||
) |
beginAbstractClass | ( | string | $classname, |
?string | $extends = null , |
||
array | $implements = [] |
||
) |
endClass | ( | ) |
beginInterface | ( | string | $classname, |
array | $extends = [] |
||
) |
endInterface | ( | ) |
beginTrait | ( | string | $classname | ) |
endTrait | ( | ) |
beginMethodOverride | ( | \ReflectionMethod | $parentMethod, |
array & | $parentCallArgs = null |
||
) |
beginMethod | ( | string | $name, |
array | $args = [] , |
||
string | $returnType = '' |
||
) |
beginProtectedMethod | ( | string | $name, |
array | $args = [] , |
||
string | $returnType = '' |
||
) |
beginPrivateMethod | ( | string | $name, |
array | $args = [] , |
||
string | $returnType = '' |
||
) |
beginFinalMethod | ( | string | $name, |
array | $args = [] , |
||
string | $returnType = '' |
||
) |
beginStaticMethod | ( | string | $name, |
array | $args = [] , |
||
string | $returnType = '' |
||
) |
endMethod | ( | ) |
writeAbstractMethod | ( | string | $name, |
array | $args = [] , |
||
string | $returnType = '' |
||
) |
writeInterfaceMethod | ( | string | $name, |
array | $args = [] , |
||
string | $returnType = '' |
||
) |
hasMethod | ( | string | $methodName | ) |