Documentation

Driver extends AbstractSQLAnywhereDriver
in package

A Doctrine DBAL driver for the SAP Sybase SQL Anywhere PHP extension.

Tags
author

Steve Müller st.mueller@dzh-online.de

link
www.doctrine-project.org
since
2.5

Table of Contents

connect()  : mixed
{@inheritdoc}
convertException()  : DriverException
Converts a given DBAL driver exception into a standardized DBAL driver exception.
createDatabasePlatformForVersion()  : AbstractPlatform
Factory method for creating the appropriate platform instance for the given version.
getDatabase()  : string
Gets the name of the database connected to for this driver.
getDatabasePlatform()  : AbstractPlatform
Gets the DatabasePlatform instance that provides all the metadata about the platform this driver connects to.
getName()  : mixed
{@inheritdoc}
getSchemaManager()  : AbstractSchemaManager
Gets the SchemaManager that can be used to inspect and change the underlying database schema of the platform this driver connects to.
buildDsn()  : string
Build the connection string for given connection parameters and driver options.

Methods

connect()

{@inheritdoc}

public connect(array<string|int, mixed> $params[, mixed $username = null ][, mixed $password = null ][, array<string|int, mixed> $driverOptions = array() ]) : mixed
Parameters
$params : array<string|int, mixed>
$username : mixed = null
$password : mixed = null
$driverOptions : array<string|int, mixed> = array()
Tags
throws
DBALException

if there was a problem establishing the connection.

Return values
mixed

convertException()

Converts a given DBAL driver exception into a standardized DBAL driver exception.

public convertException(mixed $message, DriverException $exception) : DriverException
Parameters
$message : mixed

The DBAL exception message to use.

$exception : DriverException

The DBAL driver exception to convert.

Tags
link
http://dcx.sybase.com/index.html#sa160/en/saerrors/sqlerror.html
Return values
DriverException

An instance of one of the DriverException subclasses.

createDatabasePlatformForVersion()

Factory method for creating the appropriate platform instance for the given version.

public createDatabasePlatformForVersion(mixed $version) : AbstractPlatform
Parameters
$version : mixed

The platform/server version string to evaluate. This should be given in the notation the underlying database vendor uses.

Return values
AbstractPlatform

getName()

{@inheritdoc}

public getName() : mixed
Return values
mixed

buildDsn()

Build the connection string for given connection parameters and driver options.

private buildDsn(string $host, int $port, string $server, string $dbname[, string $username = null ][, string $password = null ][, array<string|int, mixed> $driverOptions = array() ]) : string
Parameters
$host : string

Host address to connect to.

$port : int

Port to use for the connection (default to SQL Anywhere standard port 2638).

$server : string

Database server name on the host to connect to. SQL Anywhere allows multiple database server instances on the same host, therefore specifying the server instance name to use is mandatory.

$dbname : string

Name of the database on the server instance to connect to.

$username : string = null

User name to use for connection authentication.

$password : string = null

Password to use for connection authentication.

$driverOptions : array<string|int, mixed> = array()

Additional parameters to use for the connection.

Return values
string

Search results