Zend Framework  3.0
Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | List of all members
Adapter Class Reference

Public Member Functions

 __construct ($driver, Platform\PlatformInterface $platform=null, ResultSet\ResultSetInterface $queryResultPrototype=null, Profiler\ProfilerInterface $profiler=null)
 
 setProfiler (Profiler\ProfilerInterface $profiler)
 
 getProfiler ()
 
 getDriver ()
 getDriver()
 
 getPlatform ()
 
 getQueryResultSetPrototype ()
 
 getCurrentSchema ()
 
 query ($sql, $parametersOrQueryMode=self::QUERY_MODE_PREPARE, ResultSet\ResultSetInterface $resultPrototype=null)
 query() is a convenience function
 
 createStatement ($initialSql=null, $initialParameters=null)
 Create statement.
 
 getHelpers ()
 
 __get ($name)
 
- Public Member Functions inherited from ProfilerAwareInterface
 setProfiler (ProfilerInterface $profiler)
 

Public Attributes

const QUERY_MODE_EXECUTE = 'execute'
 Query Mode Constants.
 
const QUERY_MODE_PREPARE = 'prepare'
 
const PREPARE_TYPE_POSITIONAL = 'positional'
 Prepare Type Constants.
 
const PREPARE_TYPE_NAMED = 'named'
 
const FUNCTION_FORMAT_PARAMETER_NAME = 'formatParameterName'
 
const FUNCTION_QUOTE_IDENTIFIER = 'quoteIdentifier'
 
const FUNCTION_QUOTE_VALUE = 'quoteValue'
 
const VALUE_QUOTE_SEPARATOR = 'quoteSeparator'
 

Protected Member Functions

 createDriver ($parameters)
 
 createPlatform (array $parameters)
 
 createProfiler ($parameters)
 
 createDriverFromParameters (array $parameters)
 
 createPlatformFromDriver (Driver\DriverInterface $driver)
 

Protected Attributes

 $driver = null
 
 $platform = null
 
 $profiler = null
 
 $queryResultSetPrototype = null
 
 $lastPreparedStatement = null
 

Constructor & Destructor Documentation

__construct (   $driver,
Platform\PlatformInterface  $platform = null,
ResultSet\ResultSetInterface  $queryResultPrototype = null,
Profiler\ProfilerInterface  $profiler = null 
)
Parameters
Driver\DriverInterface | array$driver
Platform\PlatformInterface$platform
ResultSet\ResultSetInterface$queryResultPrototype
Profiler\ProfilerInterface$profiler
Exceptions
Exception\InvalidArgumentException

Member Function Documentation

__get (   $name)
Parameters
$name
Exceptions
Exception\InvalidArgumentException
Returns
Driver|Platform
createDriver (   $parameters)
protected
Parameters
array$parameters
Returns
Driver
Exceptions
\InvalidArgumentException
Exception\InvalidArgumentException
createDriverFromParameters ( array  $parameters)
protected
Parameters
array$parameters
Returns
Driver
Exceptions
\InvalidArgumentException
Exception\InvalidArgumentException
Deprecated:
createPlatform ( array  $parameters)
protected
Parameters
array$parameters
Returns
Platform
createPlatformFromDriver ( Driver\DriverInterface  $driver)
protected
Parameters
Driver\DriverInterface$driver
Returns
Platform
Deprecated:
createProfiler (   $parameters)
protected
Parameters
array$parameters
Returns
Profiler
Exceptions
Exception\InvalidArgumentException
createStatement (   $initialSql = null,
  $initialParameters = null 
)

Create statement.

Parameters
string$initialSql
ParameterContainer$initialParameters
Returns
Driver
getCurrentSchema ( )
getDriver ( )

getDriver()

Exceptions
Exception\RuntimeException
Returns
Driver

Implements AdapterInterface.

getHelpers ( )
getPlatform ( )
Returns
Platform

Implements AdapterInterface.

getProfiler ( )
Returns
null|Profiler
getQueryResultSetPrototype ( )
Returns
ResultSet
query (   $sql,
  $parametersOrQueryMode = self::QUERY_MODE_PREPARE,
ResultSet\ResultSetInterface  $resultPrototype = null 
)

query() is a convenience function

Parameters
string$sql
string | array | ParameterContainer$parametersOrQueryMode
\Zend\Db\ResultSet\ResultSetInterface$resultPrototype
Exceptions
Exception\InvalidArgumentException
Returns
Driver|ResultSet
setProfiler ( Profiler\ProfilerInterface  $profiler)
Parameters
Profiler\ProfilerInterface$profiler
Returns
Adapter

Member Data Documentation

$driver = null
protected
$lastPreparedStatement = null
protected
$platform = null
protected
$profiler = null
protected
$queryResultSetPrototype = null
protected
const FUNCTION_FORMAT_PARAMETER_NAME = 'formatParameterName'
const FUNCTION_QUOTE_IDENTIFIER = 'quoteIdentifier'
const FUNCTION_QUOTE_VALUE = 'quoteValue'
const PREPARE_TYPE_NAMED = 'named'
const PREPARE_TYPE_POSITIONAL = 'positional'

Prepare Type Constants.

const QUERY_MODE_EXECUTE = 'execute'

Query Mode Constants.

const QUERY_MODE_PREPARE = 'prepare'
const VALUE_QUOTE_SEPARATOR = 'quoteSeparator'