1 | <?php |
||
23 | class PhpClass extends AbstractPhpStruct implements GenerateableInterface, TraitsInterface, ConstantsInterface, PropertiesInterface { |
||
24 | |||
25 | use AbstractPart; |
||
26 | use ConstantsPart; |
||
27 | use FinalPart; |
||
28 | use InterfacesPart; |
||
29 | use PropertiesPart; |
||
30 | use TraitsPart; |
||
31 | |||
32 | /** @var string */ |
||
33 | private $parentClassName; |
||
34 | |||
35 | /** |
||
36 | * Creates a PHP class from file |
||
37 | * |
||
38 | * @param string $filename |
||
39 | * @return PhpClass |
||
40 | */ |
||
41 | 12 | public static function fromFile(string $filename): self { |
|
52 | |||
53 | /** |
||
54 | * Creates a new PHP class |
||
55 | * |
||
56 | * @param string $name the qualified name |
||
57 | */ |
||
58 | 46 | public function __construct($name = null) { |
|
64 | |||
65 | /** |
||
66 | * Returns the parent class name |
||
67 | * |
||
68 | * @return string |
||
69 | */ |
||
70 | 16 | public function getParentClassName(): ?string { |
|
73 | |||
74 | /** |
||
75 | * Sets the parent class name |
||
76 | * |
||
77 | * @param string|null $name the new parent |
||
78 | * @return $this |
||
79 | */ |
||
80 | 6 | public function setParentClassName(?string $name) { |
|
85 | |||
86 | 5 | public function generateDocblock(): void { |
|
97 | |||
98 | } |
||
99 |