Class NeevoConnection
Representation of database connection.
Common configuration: (see also driver specific configuration)
- tablePrefix => prefix for table names
- lazy (bool) => If TRUE, connection will be established only when
required.
- result - detectTypes (bool) => Detect column types automatically -
formatDate => Date/time format (empty for DateTime instance).
- rowClass => Name of class to use as a row class.
-
NeevoConnection
implements
INeevoObservable,
ArrayAccess
Methods summary
public
|
|
public
|
#
__destruct( )
Close database connection.
Close database connection.
|
public
|
#
connect( )
Open database connection.
Open database connection.
|
public
mixed
|
#
getConfig( string $key = null )
Get configuration.
Parameters
Returns
mixed
|
public
string
|
#
getPrefix( )
Get defined table prefix.
Get defined table prefix.
Returns
string
|
public
INeevoDriver
|
#
getDriver( )
Get the current driver instance.
Get the current driver instance.
Returns
|
public
string
|
#
getParser( )
Get the current parser class name.
Get the current parser class name.
Returns
string
|
public
INeevoCache
|
#
getCache( )
Get the current cache storage instance.
Get the current cache storage instance.
Returns
|
public
|
|
public
|
#
attachObserver( INeevoObserver $observer, integer $event )
Attach given observer to given $event.
Attach given observer to given $event.
Parameters
Implementation of
|
public
|
|
public
|
#
notifyObservers( integer $event )
Notify all observers attached to given event.
Notify all observers attached to given event.
Parameters
Implementation of
|
public
mixed
|
#
offsetGet( string $key )
Get configuration value.
Parameters
Returns
mixed
Implementation of
|
public
boolean
|
#
offsetExists( mixed $key )
Check if configuration value exists.
Check if configuration value exists.
Parameters
Returns
boolean
Implementation of
|
public static
|
#
alias( array & $config, string $key, string $alias )
Create an alias for configuration value.
Create an alias for configuration value.
Parameters
- $config
array $config Passed by reference
- $key
string $key
- $alias
string $alias Alias of $key
|
protected
|
#
setDriver( string $driver )
Set the driver and statement parser.
Set the driver and statement parser.
Parameters
Throws
|
protected
boolean
|
#
isDriver( string $class )
Check wether the given class is valid Neevo driver.
Check wether the given class is valid Neevo driver.
Parameters
Returns
boolean
|
protected
boolean
|
#
isParser( string $class )
Check wether the given class is valid Neevo statement parser.
Check wether the given class is valid Neevo statement parser.
Parameters
Returns
boolean
|
Methods inherited from ArrayAccess
offsetSet()
,
offsetUnset()
Magic methods summary