1 | <?php |
||
21 | class PhpClass extends AbstractPhpStruct implements GenerateableInterface, TraitsInterface, ConstantsInterface, PropertiesInterface { |
||
22 | |||
23 | use AbstractPart; |
||
24 | use ConstantsPart; |
||
25 | use FinalPart; |
||
26 | use InterfacesPart; |
||
27 | use PropertiesPart; |
||
28 | use TraitsPart; |
||
29 | |||
30 | /** @var string */ |
||
31 | private $parentClassName; |
||
32 | |||
33 | /** |
||
34 | * Creates a PHP class from reflection |
||
35 | * |
||
36 | * @deprecated Use fromFile() instead |
||
37 | * @param \ReflectionClass $ref |
||
38 | * @return PhpClass |
||
39 | */ |
||
40 | public static function fromReflection(\ReflectionClass $ref) { |
||
41 | return static::fromFile($ref->getFileName()); |
||
42 | } |
||
43 | |||
44 | /** |
||
45 | * Creates a PHP class from file |
||
46 | * |
||
47 | * @param string $filename |
||
48 | * @return PhpClass |
||
49 | */ |
||
50 | 11 | public static function fromFile($filename) { |
|
61 | |||
62 | /** |
||
63 | * Creates a new PHP class |
||
64 | * |
||
65 | * @param string $name the qualified name |
||
66 | */ |
||
67 | 45 | public function __construct($name = null) { |
|
73 | |||
74 | /** |
||
75 | * Returns the parent class name |
||
76 | * |
||
77 | * @return string |
||
78 | */ |
||
79 | 13 | public function getParentClassName() { |
|
82 | |||
83 | /** |
||
84 | * Sets the parent class name |
||
85 | * |
||
86 | * @param string|null $name the new parent |
||
87 | * @return $this |
||
88 | */ |
||
89 | 3 | public function setParentClassName($name) { |
|
94 | |||
95 | 5 | public function generateDocblock() { |
|
106 | |||
107 | } |
||
108 |