Magic method that implements
string $method:
array $args:
mixed
\BadMethodCallException
public function __call($method, $args) {
$command = substr($method, 0, 3);
$field = lcfirst(substr($method, 3));
if ($command == "set") {
$this
->set($field, $args);
}
else {
if ($command == "get") {
return $this
->get($field);
}
else {
if ($command == "add") {
$this
->add($field, $args);
}
else {
throw new \BadMethodCallException("There is no method " . $method . " on " . $this->cm
->getName());
}
}
}
}