ZenMagick 0.9.8


org.zenmagick.core.services.database.provider.ZMCreoleDatabase
\core\services\database\provider\ZMCreoleDatabase.php at line 32

Class ZMCreoleDatabase

ZMObject
└─ZMCreoleDatabase
All Implemented Interfaces:
ZMDatabase

public class ZMCreoleDatabase
extends ZMObject

Implementation of the ZenMagick database layer using Creole.

See Also:
http://creole.phpdb.org/trac/
Author:
DerManoMann
Version:
$Id: ZMCreoleDatabase.php 2610 2009-11-20 02:45:25Z dermanomann $

Fields inherited from org.zenmagick.core.ZMObject
properties_
Constructor Summary

ZMCreoleDatabase(array conf)

Create a new instance.

Method Summary
void

beginTransaction()

{@inheritDoc}

void

commit()

{@inheritDoc}

void

createModel(mixed table, mixed model, mixed mapping)

{@inheritDoc}

void

getConfig()

{@inheritDoc}

protected long

getExecutionTime(string start)

Get the elapsed time since $start.

void

getMetaData(mixed table)

{@inheritDoc}

void

getResource()

{@inheritDoc}

void

getStats()

{@inheritDoc}

void

loadModel(mixed table, mixed key, mixed modelClass, mixed mapping)

{@inheritDoc}

protected A

prepareStatement(string sql, mixed args, array mapping)

Create a prepared statement.

void

query(mixed sql, mixed args, mixed modelClass)

{@inheritDoc}

void

querySingle(mixed sql, mixed args, mixed modelClass)

{@inheritDoc}

void

removeModel(mixed table, mixed model, mixed mapping)

{@inheritDoc}

void

rollback()

{@inheritDoc}

protected mixed

rs2model(string modelClass, ResultSet rs, array mapping)

Create model and populate using the given rs and field map.

void

update(mixed sql, mixed data)

{@inheritDoc}

void

updateModel(mixed table, mixed model, mixed mapping)

{@inheritDoc}

Methods inherited from org.zenmagick.core.ZMObject
attachMethod, get, getAttachedMethods, getPropertyNames, set, singleton

Constructor Detail

\core\services\database\provider\ZMCreoleDatabase.php at line 44

ZMCreoleDatabase

public ZMCreoleDatabase(array conf)

Create a new instance.

Parameters:
conf - Configuration properties.

Method Detail

\core\services\database\provider\ZMCreoleDatabase.php at line 95

beginTransaction

public void beginTransaction()


\core\services\database\provider\ZMCreoleDatabase.php at line 102

commit

public void commit()


\core\services\database\provider\ZMCreoleDatabase.php at line 179

createModel

public void createModel(mixed table, mixed model, mixed mapping)


\core\services\database\provider\ZMCreoleDatabase.php at line 88

getConfig

public void getConfig()


\core\services\database\provider\ZMCreoleDatabase.php at line 134

getExecutionTime

protected long getExecutionTime(string start)

Get the elapsed time since $start.

Parameters:
start - The starting time.
Returns:
The time in milliseconds.

\core\services\database\provider\ZMCreoleDatabase.php at line 550

getMetaData

public void getMetaData(mixed table)


\core\services\database\provider\ZMCreoleDatabase.php at line 590

getResource

public void getResource()


\core\services\database\provider\ZMCreoleDatabase.php at line 116

getStats

public void getStats()


\core\services\database\provider\ZMCreoleDatabase.php at line 142

loadModel

public void loadModel(mixed table, mixed key, mixed modelClass, mixed mapping)


\core\services\database\provider\ZMCreoleDatabase.php at line 392

prepareStatement

protected A prepareStatement(string sql, mixed args, array mapping)

Create a prepared statement.

Parameters:
sql - The initial SQL.
args - The data either as map or ZMObject instance.
mapping - The field mapping.
Returns:
PreparedStatement or null;

\core\services\database\provider\ZMCreoleDatabase.php at line 364

query

public void query(mixed sql, mixed args, mixed modelClass)


\core\services\database\provider\ZMCreoleDatabase.php at line 356

querySingle

public void querySingle(mixed sql, mixed args, mixed modelClass)


\core\services\database\provider\ZMCreoleDatabase.php at line 309

removeModel

public void removeModel(mixed table, mixed model, mixed mapping)


\core\services\database\provider\ZMCreoleDatabase.php at line 109

rollback

public void rollback()


\core\services\database\provider\ZMCreoleDatabase.php at line 482

rs2model

protected mixed rs2model(string modelClass, ResultSet rs, array mapping)

Create model and populate using the given rs and field map.

Parameters:
modelClass - The model class.
rs - A Creole result set.
mapping - The field mapping.
Returns:
The model instance or array (if modelClass is null).

\core\services\database\provider\ZMCreoleDatabase.php at line 238

update

public void update(mixed sql, mixed data)


\core\services\database\provider\ZMCreoleDatabase.php at line 255

updateModel

public void updateModel(mixed table, mixed model, mixed mapping)


ZenMagick 0.9.8