/**
* Executes DSL methods
*
* @throws QueryBuilderException
*
* @param string $name
* @param array $arguments
* @return mixed
*/
public function __call($name, array $arguments)
{
// defined check
if (false === method_exists($this->_dsl, $name)) {
throw new QueryBuilderException('undefined ' . $this->_dsl->getType() . ' "' . $name . '"');
}
// version support check
if (false === $this->_version->supports($name, $this->_dsl->getType())) {
$reflection = new \ReflectionClass($this->_version);
throw new QueryBuilderException($this->_dsl->getType() . ' "' . $name . '" in ' . $reflection->getShortName() . ' not supported');
}
return call_user_func_array(array($this->_dsl, $name), $arguments);
}