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( |
||
77 | |||
78 | /** |
||
79 | * Is this method from extensions ? |
||
80 | * |
||
81 | * @param string $method |
||
82 | * @return bool |
||
83 | * @access protected |
||
84 | */ |
||
85 | protected function hasExtensionMethod(/*# string */ $method)/*# : bool */ |
||
89 | |||
90 | /** |
||
91 | * Include this in server's __call() |
||
92 | * |
||
93 | * @param string $method |
||
94 | * @param array $args |
||
95 | * @return mixed |
||
96 | * @access protected |
||
97 | */ |
||
98 | protected function runExtension(/*# string */ $method, array $args) |
||
109 | } |
||
110 |