public function __call($method, $args)
{
if (!$this->_schema) {
// Create the database-specific (but not adapter specific) schema
// object.
$this->_schema = new $this->_schemaClass($this, array('cache' => $this->_cache, 'logger' => $this->_logger));
$this->_schemaMethods = array_flip(get_class_methods($this->_schema));
}
if (isset($this->_schemaMethods[$method])) {
return call_user_func_array(array($this->_schema, $method), $args);
}
$support = new Horde_Support_Backtrace();
$context = $support->getContext(1);
$caller = $context['function'];
if (isset($context['class'])) {
$caller = $context['class'] . '::' . $caller;
}
throw new BadMethodCallException('Call to undeclared method "' . get_class($this) . '::' . $method . '" from "' . $caller . '"');
}