public function __construct(BaseDriver $driver, PDO $connection) { $this->driver = $driver; $this->connection = $connection; $c = ServiceContainer::getInstance(); $this->config = $c['config_loader']; // pre-initialize all schema objects and expand template schema $this->schemas = SchemaUtils::findSchemasByConfigLoader($this->config, $c['logger']); $this->schemas = SchemaUtils::filterBuildableSchemas($this->schemas); // map table names to declare schema objects foreach ($this->schemas as $schema) { $this->schemaMap[$schema->getTable()] = $schema; } }