I'm trying to display a custom error message if a method doesnt' exist as Method() or as getMethod():
public function __call($name, $args = array()){
$getter = "get{$name}";
try {
echo call_user_func_array(array(&$this, $getter), $args);
} catch (Exception $e) {
trigger_error($e->getFile.' on line '.$e->getLine.': Method '.$name.' is not defined.', E_USER_ERROR)
}
}
but it doesn't work. I get a "connection closed by remote server" message in the browser :|