/**
* @param $name
* @param $args
* @return mixed
* @throws \Exception
*/
public function __call($name, $args)
{
if (!in_array($name, self::$ALLOWED_METHODS)) {
throw new \Exception(sprintf('The method "%s" is not allowed.', $name));
}
$this->connect();
$result = call_user_func_array(array(\DB::getMDB(), $name), $args);
$this->disconnect();
return $result;
}