Commit 0a71622a authored by Evan Prodromou's avatar Evan Prodromou

Widget automatically delegates unimplemented methods to attribute

parent fac0d849
......@@ -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);
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment