Overview

Namespaces

  • Neevo
    • Cache
    • Drivers
    • Nette
  • PHP

Classes

  • BaseStatement
  • Connection
  • Literal
  • Loader
  • Manager
  • Parser
  • Result
  • ResultIterator
  • Row
  • Statement

Interfaces

  • ICache
  • IDriver
  • IObservable
  • IObserver

Exceptions

  • DriverException
  • ImplementationException
  • NeevoException
  • Overview
  • Namespace
  • Class
  • Tree

Class Connection

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.
Neevo\Connection implements Neevo\IObservable, ArrayAccess
Namespace: Neevo
Author: Smasty
Located at Neevo/Connection.php
Methods summary
public
# __construct( array|string|Traversable $config, Neevo\ICache $cache = null )

Establish a connection.

Establish a connection.

Parameters

$config
array|string|Traversable
$cache
Neevo\ICache

Throws

InvalidArgumentException
public
# __destruct( )

Close database connection.

Close database connection.

public
# connect( )

Open database connection.

Open database connection.

public mixed
# getConfig( string $key = null )

Get configuration.

Get configuration.

Parameters

$key
string

Returns

mixed
public string
# getPrefix( )

Get defined table prefix.

Get defined table prefix.

Returns

string
public Neevo\IDriver
# getDriver( )

Get the current driver instance.

Get the current driver instance.

Returns

Neevo\IDriver
public string
# getParser( )

Get the current parser class name.

Get the current parser class name.

Returns

string
public Neevo\ICache
# getCache( )

Get the current cache storage instance.

Get the current cache storage instance.

Returns

Neevo\ICache
public
# setCache( Neevo\ICache $cache )

Set the cache storage.

Set the cache storage.

Parameters

$cache
Neevo\ICache
public
# attachObserver( Neevo\IObserver $observer, integer $event )

Attach given observer to given $event.

Attach given observer to given $event.

Parameters

$observer
Neevo\IObserver
$event
integer

Implementation of

Neevo\IObservable::attachObserver
public
# detachObserver( Neevo\IObserver $observer )

Detach given observer.

Detach given observer.

Parameters

$observer
Neevo\IObserver

Implementation of

Neevo\IObservable::detachObserver
public
# notifyObservers( integer $event )

Notify all observers attached to given event.

Notify all observers attached to given event.

Parameters

$event
integer

Implementation of

Neevo\IObservable::notifyObservers
public mixed
# offsetGet( string $key )

Get configuration value.

Get configuration value.

Parameters

$key
string

Returns

mixed

Implementation of

ArrayAccess::offsetGet
public boolean
# offsetExists( mixed $key )

Check if configuration value exists.

Check if configuration value exists.

Parameters

$key
mixed

Returns

boolean

Implementation of

ArrayAccess::offsetExists
public static
# alias( array & $config, string $key, string $alias )

Create an alias for configuration value.

Create an alias for configuration value.

Parameters

$config
array
Passed by reference
$key
string
$alias
string
Alias of $key
protected
# setDriver( string $driver )

Set the driver and statement parser.

Set the driver and statement parser.

Parameters

$driver
string

Throws

Neevo\DriverException
protected boolean
# isDriver( string $class )

Check wether the given class is valid Neevo driver.

Check wether the given class is valid Neevo driver.

Parameters

$class
string

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

$class
string

Returns

boolean
Methods inherited from ArrayAccess
offsetSet(), offsetUnset()
Neevo Public API API documentation generated by ApiGen 2.6.1