forked from GNUsocial/gnu-social
Widget automatically delegates unimplemented methods to attribute
This commit is contained in:
parent
fac0d8496e
commit
0a71622aa7
@ -79,4 +79,17 @@ class Widget
|
||||
function show()
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* Delegate output methods to the outputter attribute.
|
||||
*
|
||||
* @param string $name Name of the method
|
||||
* @param array $arguments Arguments called
|
||||
*
|
||||
* @return mixed Return value of the method.
|
||||
*/
|
||||
function __call($name, $arguments)
|
||||
{
|
||||
return call_user_func_array(array($this->out, $name), $arguments);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user