Constants

FETCH_TYPE_ROW

FETCH_TYPE_ROW

FETCH_TYPE_ALL

FETCH_TYPE_ALL

Properties

$connection

$connection : 

Type

$lastConnection

$lastConnection : 

Type

$sharedInstance

$sharedInstance : 

Type

Methods

getLastInsertId()

getLastInsertId() 

getConnection()

getConnection() 

CallStoredProc()

CallStoredProc(  $_procName,   $_params,   $_fetch_type,   $_className = NULL,   $_fetch_opt = NULL) 

Parameters

$_procName
$_params
$_fetch_type
$_className
$_fetch_opt

Prepare()

Prepare(  $_query,   $_params,   $_fetchType = self::FETCH_TYPE_ROW,   $_fetch_param = \PDO::FETCH_ASSOC,   $_fetch_opt = NULL) 

Parameters

$_query
$_params
$_fetchType
$_fetch_param
$_fetch_opt

__clone()

__clone() 

optimize()

optimize() 

beginTransaction()

beginTransaction() 

commit()

commit() 

rollBack()

rollBack() 

save()

save(object  $object,   $_direct = false,   $_replace = false) : boolean

Saves an entity inside the repository. If the entity is new a new row will be created. If the entity is not new the row will be updated.

Parameters

object $object
$_direct
$_replace

Returns

boolean

refresh()

refresh(  $object) 

Parameters

$object

getWithFilter()

getWithFilter(  $_filters,   $_object) : \Objet

Retourne une liste d'objets ou un objet en fonction de filtres

Parameters

$_filters

Filtres à appliquer

$_object

Objet sur lequel appliquer les filtres

Returns

\Objet —

ou liste d'objets correspondant à la requête

remove()

remove(object  $object) : boolean

Deletes an entity.

Parameters

object $object

Returns

boolean

checksum()

checksum(  $_table) 

Parameters

$_table

lock()

lock(object  $object) : boolean

Lock an entity.

Parameters

object $object

Returns

boolean

buildField()

buildField(  $_class,   $_prefix = '') 

Parameters

$_class
$_prefix

__construct()

__construct() 

getTableName()

getTableName(  $object) : string

Returns the name of the table where to save entities.

Parameters

$object

Returns

string

getFields()

getFields(\type  $object) : \type

Parameters

\type $object

Throws

\RuntimeException

Returns

\type

setField()

setField(object  $object, string  $field, mixed  $value) 

Forces the value of a field of a given object, even if this field is not accessible.

Parameters

object $object

The entity to alter

string $field

The name of the member to alter

mixed $value

The value to give to the member

buildQuery()

buildQuery(\type  $object) : \type

Builds the elements for an SQL query. It will return two lists, the first being the list of parts "key=:key" to inject in the SQL, the second being the mapping of these parameters to the values.

Parameters

\type $object

Returns

\type

getField()

getField(\type  $object, \type  $field) : \type

Returns the value of a field of a given object. It'll try to use a getter first if defined. If not defined, we'll use the reflection API.

Parameters

\type $object
\type $field

Throws

\RuntimeException

if the getter is not defined

Returns

\type

getReflectionClass()

getReflectionClass(object  $object) : \ReflectionClass

Returns the reflection class for the given object.

Parameters

object $object

Returns

\ReflectionClass