1 | <?php |
||
17 | class PhpTrait extends AbstractPhpStruct implements GenerateableInterface, TraitsInterface, PropertiesInterface { |
||
18 | |||
19 | use PropertiesPart; |
||
20 | use TraitsPart; |
||
21 | |||
22 | /** |
||
23 | * Creates a PHP trait from reflection |
||
24 | * |
||
25 | * @deprecated Use fromFile() instead |
||
26 | * @param \ReflectionClass $ref |
||
27 | * @return PhpTrait |
||
28 | */ |
||
29 | public static function fromReflection(\ReflectionClass $ref) { |
||
30 | return static::fromFile($ref->getFileName()); |
||
31 | } |
||
32 | |||
33 | /** |
||
34 | * Creates a PHP trait from a file |
||
35 | * |
||
36 | * @param string $filename |
||
37 | * @return PhpTrait |
||
38 | */ |
||
39 | 2 | public static function fromFile($filename) { |
|
50 | |||
51 | /** |
||
52 | * Creates a new PHP trait |
||
53 | * |
||
54 | * @param string $name qualified name |
||
55 | */ |
||
56 | 8 | public function __construct($name = null) { |
|
60 | |||
61 | /** |
||
62 | * @inheritDoc |
||
63 | */ |
||
64 | 4 | public function generateDocblock() { |
|
71 | } |
||
72 |