1 | <?php |
||
13 | class PdfLetters extends RecordManager |
||
14 | { |
||
15 | use PdfLettersTrait; |
||
16 | |||
17 | /** |
||
18 | * @inheritdoc |
||
19 | */ |
||
20 | public function getPrimaryKey() |
||
24 | |||
25 | public function generateTable() |
||
29 | |||
30 | /** |
||
31 | * @param $type |
||
32 | * @return AbstractRecordsTrait |
||
|
|||
33 | */ |
||
34 | public function getParentManagerFromType($type) |
||
38 | |||
39 | /** |
||
40 | * @return string |
||
41 | */ |
||
42 | protected function getCustomFieldsManagerClass() |
||
46 | } |
||
47 |
In PHP traits cannot be used for type-hinting as they do not define a well-defined structure. This is because any class that uses a trait can rename that trait’s methods.
If you would like to return an object that has a guaranteed set of methods, you could create a companion interface that lists these methods explicitly.