Skip to content
Snippets Groups Projects
Commit 05059938 authored by Thomas Flori's avatar Thomas Flori
Browse files

use magic __call to pass every call to adapter

parent d5a534b8
No related branches found
No related tags found
No related merge requests found
......@@ -4,6 +4,9 @@ namespace Breyta;
use Breyta\Adapter\BasicAdapter;
/**
* @method mixed exec(string $statement)
*/
abstract class AbstractMigration
{
private $adapter;
......@@ -23,8 +26,8 @@ abstract class AbstractMigration
*/
abstract public function down(): void;
protected function exec($statement)
public function __call($method , $args)
{
return $this->adapter->exec($statement);
return call_user_func_array([$this->adapter, $method], $args);
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment