Doctrine\DBAL\Driver\SQLSrv\SQLSrvStatement::__construct PHP Method

__construct() public method

public __construct ( resource $conn, string $sql, Doctrine\DBAL\Driver\SQLSrv\LastInsertId $lastInsertId = null )
$conn resource
$sql string
$lastInsertId Doctrine\DBAL\Driver\SQLSrv\LastInsertId
    public function __construct($conn, $sql, LastInsertId $lastInsertId = null)
    {
        $this->conn = $conn;
        $this->sql = $sql;
        if (stripos($sql, 'INSERT INTO ') === 0) {
            $this->sql .= self::LAST_INSERT_ID_SQL;
            $this->lastInsertId = $lastInsertId;
        }
    }