Skip to content

Instantly share code, notes, and snippets.

@dhrrgn
Created September 30, 2016 15:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dhrrgn/8c03792ecab2b612843c9c9135c49ade to your computer and use it in GitHub Desktop.
Save dhrrgn/8c03792ecab2b612843c9c9135c49ade to your computer and use it in GitHub Desktop.
<?php
public function __call($method, $args) {
if (! $this->isConnected() || ! method_exists($this->pdo, $method)) {
throw new \BadMethodCallException("Method '$method' not found on ExtendedPdo");
}
return call_user_func_array([$this->pdo, $method], $args);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment