1 | <?php |
||
14 | class Module extends ModelAbstract |
||
15 | { |
||
16 | /** |
||
17 | * name of the table |
||
18 | * |
||
19 | * @var string |
||
20 | */ |
||
21 | |||
22 | protected $_table = 'modules'; |
||
23 | |||
24 | /** |
||
25 | * get the module by alias |
||
26 | * |
||
27 | * @since 4.5.0 |
||
28 | * |
||
29 | * @param string $moduleAlias alias of the module |
||
30 | * |
||
31 | * @return object|null |
||
32 | */ |
||
33 | |||
34 | public function getByAlias(string $moduleAlias = null) : ?object |
||
38 | |||
39 | /** |
||
40 | * create the module by array |
||
41 | * |
||
42 | * @since 3.3.0 |
||
43 | * |
||
44 | * @param array $createArray array of the create |
||
45 | * |
||
46 | * @return bool |
||
47 | */ |
||
48 | |||
49 | 1 | public function createByArray(array $createArray = []) : bool |
|
57 | |||
58 | /** |
||
59 | * delete the module by alias |
||
60 | * |
||
61 | * @since 3.3.0 |
||
62 | * |
||
63 | * @param string $moduleAlias alias of the module |
||
64 | * |
||
65 | * @return bool |
||
66 | */ |
||
67 | |||
68 | 1 | public function deleteByAlias(string $moduleAlias = null) : bool |
|
72 | } |
||
73 |
If you implement
__call
and you know which methods are available, you can improve IDE auto-completion and static analysis by adding a @method annotation to the class.This is often the case, when
__call
is implemented by a parent class and only the child class knows which methods exist: