PHP Class gossi\codegen\model\PhpClass

Author: Thomas Gossmann
Inheritance: extends AbstractPhpStruct, implements gossi\codegen\model\GenerateableInterface, implements gossi\codegen\model\TraitsInterface, implements gossi\codegen\model\ConstantsInterface, implements gossi\codegen\model\PropertiesInterface, use trait gossi\codegen\model\parts\AbstractPart, use trait gossi\codegen\model\parts\ConstantsPart, use trait gossi\codegen\model\parts\FinalPart, use trait gossi\codegen\model\parts\InterfacesPart, use trait gossi\codegen\model\parts\PropertiesPart, use trait gossi\codegen\model\parts\TraitsPart
ファイルを表示 Open project: gossi/php-code-generator Class Usage Examples

Public Methods

Method Description
__construct ( string $name = null ) Creates a new PHP class
fromFile ( string $filename ) : PhpClass Creates a PHP class from file
fromReflection ( ReflectionClass $ref ) : PhpClass Creates a PHP class from reflection
generateDocblock ( )
getParentClassName ( ) : string Returns the parent class name
setParentClassName ( string | null $name ) Sets the parent class name

Method Details

__construct() public method

Creates a new PHP class
public __construct ( string $name = null )
$name string the qualified name

fromFile() public static method

Creates a PHP class from file
public static fromFile ( string $filename ) : PhpClass
$filename string
return PhpClass

fromReflection() public static method

Creates a PHP class from reflection
Deprecation: Use fromFile() instead
public static fromReflection ( ReflectionClass $ref ) : PhpClass
$ref ReflectionClass
return PhpClass

generateDocblock() public method

public generateDocblock ( )

getParentClassName() public method

Returns the parent class name
public getParentClassName ( ) : string
return string

setParentClassName() public method

Sets the parent class name
public setParentClassName ( string | null $name )
$name string | null the new parent