1 | <?php |
||
30 | trait ExtensionAwareTrait |
||
31 | { |
||
32 | /** |
||
33 | * Methods provided by extensions |
||
34 | * |
||
35 | * @var array |
||
36 | * @access protected |
||
37 | */ |
||
38 | protected $extension_methods = []; |
||
39 | |||
40 | /** |
||
41 | * @param string $method |
||
42 | * @param array $arguments |
||
43 | * @return mixed |
||
44 | * @throws BadMethodCallException if method not found |
||
45 | * @access public |
||
46 | */ |
||
47 | public function __call($method, array $arguments) |
||
57 | |||
58 | /** |
||
59 | * {@inheritDoc} |
||
60 | */ |
||
61 | public function addExtension( |
||
78 | |||
79 | /** |
||
80 | * Is this method from extensions ? |
||
81 | * |
||
82 | * @param string $method |
||
83 | * @return bool |
||
84 | * @access protected |
||
85 | */ |
||
86 | protected function hasExtensionMethod(/*# string */ $method)/*# : bool */ |
||
90 | |||
91 | /** |
||
92 | * Include this in server's __call() |
||
93 | * |
||
94 | * @param string $method |
||
95 | * @param array $args |
||
96 | * @return mixed |
||
97 | * @access protected |
||
98 | */ |
||
99 | protected function runExtension(/*# string */ $method, array $args) |
||
107 | } |
||
108 |