src/ActiveDoctrine/Selector/AbstractSelector.php
/**
     * Get a vendor-specific selector based on a connection instance.
     *
     * @param  Connection       $connection A connection instance
     * @param  string           $table      The table to select from
     * @return AbstractSelector A selector instance
     * @throws DBALException
     */
Get a vendor-specific selector based on a connection instance.
@param  Connection       $connection A connection instance
@param  string           $table      The table to select from
@return AbstractSelector A selector instance
@throws DBALException
Get a vendor - specific selector based on a connection instance . @param Connection $connection A connection instance @param string $table The table to select from @return AbstractSelector A selector instance @throws DBALException
public static function fromConnection(Connection $connection, $table, array $types = [])
    {
        $name = $connection->getDriver()->getName();
        switch ($name) {
        case 'pdo_mysql':
            return new MysqlSelector($connection, $table, $types);
        case 'pdo_sqlite':
            return new SqliteSelector($connection, $table, $types);
        default:
            throw new DBALException("Unsupported database type: $name");
        }
    }
public static function fromConnection ( Connection $ connection , $ table , array $ types = [ ] ) { $ name = $ connection -> getDriver ( ) -> getName ( ) ; switch ( $ name ) { case 'pdo_mysql' : return new MysqlSelector ( $ connection , $ table , $ types ) ; case 'pdo_sqlite' : return new SqliteSelector ( $ connection , $ table , $ types ) ; default : throw new DBALException ( " Unsupported database type:  $ name " ) ; } }
Get a vendor-specific selector based on a connection instance.
Get a vendor - specific selector based on a connection instance .