Neevo Public API
  • Namespace
  • Class
  • Tree

Namespaces

  • Neevo
    • Cache
    • Drivers
    • Nette
  • PHP

Classes

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

Interfaces

  • DriverInterface
  • ObservableInterface
  • ObserverInterface

Exceptions

  • DriverException
  • ImplementationException
  • NeevoException

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\ObservableInterface, ArrayAccess
Namespace: Neevo
Author: Smasty
Located at Neevo/Connection.php

Methods summary

public
# __construct( array|string|Traversable|PDO $config, Neevo\Cache\StorageInterface $cache = null )

Establishes a connection.

Establishes a connection.

Parameters

$config
array|string|Traversable|PDO
$config
$cache
Neevo\Cache\StorageInterface
$cache

Throws

InvalidArgumentException
public
# __destruct( )

Closes database connection.

Closes database connection.

public
# connect( )

Opens database connection.

Opens database connection.

public mixed
# getConfig( string $key = null )

Returns configuration.

Returns configuration.

Parameters

$key
string
$key

Returns

mixed
public string
# getPrefix( )

Returns defined table prefix.

Returns defined table prefix.

Returns

string
public Neevo\DriverInterface
# getDriver( )

Returns the current driver instance.

Returns the current driver instance.

Returns

Neevo\DriverInterface
public string
# getParser( )

Returns the current parser class name.

Returns the current parser class name.

Returns

string
public Neevo\Cache\StorageInterface
# getCache( )

Returns the current cache storage instance.

Returns the current cache storage instance.

Returns

Neevo\Cache\StorageInterface
public
# setCache( Neevo\Cache\StorageInterface $cache )

Sets the cache storage.

Sets the cache storage.

Parameters

$cache
Neevo\Cache\StorageInterface
$cache
public
# attachObserver( Neevo\ObserverInterface $observer, integer $event )

Attaches given observer to given $event.

Attaches given observer to given $event.

Parameters

$observer
Neevo\ObserverInterface
$observer
$event
integer
$event

Implementation of

Neevo\ObservableInterface::attachObserver()
public
# detachObserver( Neevo\ObserverInterface $observer )

Detaches given observer.

Detaches given observer.

Parameters

$observer
Neevo\ObserverInterface
$observer

Implementation of

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

Notifies all observers attached to given event.

Notifies all observers attached to given event.

Parameters

$event
integer
$event

Implementation of

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

Returns configuration value.

Returns configuration value.

Parameters

$key
string
$key

Returns

mixed

Implementation of

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

Checks if configuration value exists.

Checks if configuration value exists.

Parameters

$key
mixed
$key

Returns

boolean

Implementation of

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

Creates an alias for configuration value.

Creates 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 )

Sets the driver and statement parser.

Sets the driver and statement parser.

Parameters

$driver
string
$driver

Throws

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

Checks wether the given class is valid Neevo driver.

Checks wether the given class is valid Neevo driver.

Parameters

$class
string
$class

Returns

boolean
protected boolean
# isParser( string $class )

Checks wether the given class is valid Neevo statement parser.

Checks wether the given class is valid Neevo statement parser.

Parameters

$class
string
$class

Returns

boolean

Methods inherited from ArrayAccess

offsetSet(), offsetUnset()

Magic methods summary

Neevo Public API API documentation generated by ApiGen 2.8.0