/** * Constructor * * @param \PDO $connection * @param string $tableName */ public function __construct(\PDO $connection, $tableName, $schemaName = 'public') { parent::__construct($connection, $tableName); $driver = $this->connection->getAttribute(PDO::ATTR_DRIVER_NAME); $this->quote = in_array($driver, array('mysql', 'pgsql')) ? '"' : '`'; $this->schemaName = $schemaName; }
/** * Constructor * * @param \PDO $connection * @param string $tableName * * @throws \Exception */ public function __construct(\PDO $connection, $tableName) { parent::__construct($connection, $tableName); $driver = $this->connection->getAttribute(PDO::ATTR_DRIVER_NAME); if (!in_array($driver, array('oci'))) { throw new \Exception('Please install OCI drivers for PDO!'); } }