public function __call($method, $args)
{
if (substr($method, 0, 3) == 'set') {
$field = strtolower(substr($method, 3));
if (in_array($field, $this->ogoneFields)) {
$this->parameters[$field] = $args[0];
return;
}
}
if (substr($method, 0, 3) == 'get') {
$field = strtolower(substr($method, 3));
if (array_key_exists($field, $this->parameters)) {
return $this->parameters[$field];
}
}
throw new BadMethodCallException("Unknown method {$method}");
}