Neevo Public API
  • Namespace
  • Class
  • Tree

Namespaces

  • Neevo
    • Nette
  • None
  • PHP

Classes

  • Neevo
  • NeevoBaseStmt
  • NeevoCacheFile
  • NeevoCacheMemcache
  • NeevoCacheMemory
  • NeevoCacheSession
  • NeevoConnection
  • NeevoDriverMySQL
  • NeevoDriverMySQLi
  • NeevoDriverPgSQL
  • NeevoDriverSQLite2
  • NeevoDriverSQLite3
  • NeevoLiteral
  • NeevoLoader
  • NeevoObserverMap
  • NeevoParser
  • NeevoResult
  • NeevoResultIterator
  • NeevoRow
  • NeevoStmt

Interfaces

  • INeevoCache
  • INeevoDriver
  • INeevoObservable
  • INeevoObserver

Exceptions

  • NeevoDriverException
  • NeevoException
  • NeevoImplementationException

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
Package: Neevo
Author: Martin Srank
Located at neevo/NeevoConnection.php

Methods summary

public
# __construct( array|string|Traversable $config, INeevoCache $cache = null )

Establish a connection.

Establish a connection.

Parameters

$config
array|string|Traversable
$config
$cache
INeevoCache
$cache

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
$key

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

INeevoDriver
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

INeevoCache
public
# setCache( INeevoCache $cache )

Set the cache storage.

Set the cache storage.

Parameters

$cache
INeevoCache
$cache
public
# attachObserver( INeevoObserver $observer, integer $event )

Attach given observer to given $event.

Attach given observer to given $event.

Parameters

$observer
INeevoObserver
$observer
$event
integer
$event

Implementation of

INeevoObservable::attachObserver()
public
# detachObserver( INeevoObserver $observer )

Detach given observer.

Detach given observer.

Parameters

$observer
INeevoObserver
$observer

Implementation of

INeevoObservable::detachObserver()
public
# notifyObservers( integer $event )

Notify all observers attached to given event.

Notify all observers attached to given event.

Parameters

$event
integer
$event

Implementation of

INeevoObservable::notifyObservers()
public mixed
# offsetGet( string $key )

Get configuration value.

Get configuration value.

Parameters

$key
string
$key

Returns

mixed

Implementation of

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

Check if configuration value exists.

Check if configuration value exists.

Parameters

$key
mixed
$key

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
$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

$driver
string
$driver

Throws

NeevoDriverException
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
$class

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
$class

Returns

boolean

Methods inherited from ArrayAccess

offsetSet(), offsetUnset()

Magic methods summary

Neevo Public API API documentation generated by ApiGen 2.8.0