PhpMyObject
[ class tree: PhpMyObject ] [ index: PhpMyObject ] [ all elements ]

Class: PMO_Dbms

Source Location: /fichiers/v0.15/PMO_core/PMO_Dbms.php

Interface Overview


This interface defines the methods a class must implement to provide a working Dbms driver class.


Author(s):

Methods



Class Details

[line 45]
This interface defines the methods a class must implement to provide a working Dbms driver class.



Tags:

see:  PMO_MyDbms


[ Top ]


Class Methods


static method factory [line 55]

static PMO_Dbms factory( [ $object = null])

The implementatio must create a PMO_MyDbms object or if it already exists, return a reference of this object instance



Parameters:

object   $object   a optional PDO object to use.

[ Top ]

method beginTransaction [line 159]

void beginTransaction( )

the implementation must start a transaction



Tags:

access:  public


[ Top ]

method commit [line 169]

void commit( )

the implemetation ust commit the started transaction



Tags:

access:  public


[ Top ]

method connect [line 63]

void connect( $authdb)

The implementation must create a data link with the database



Tags:

see:  PMO_MyConfig
access:  public


Parameters:

array   $authdb   an array containing the needed connection info

[ Top ]

method delete [line 144]

TRUE delete( PMO_Object $object)

the implementation must delete data corresponding to the PMO_Object in database All primary key must be fill.



Tags:

throws:  Exception
access:  public


Parameters:

PMO_Object   $object  

[ Top ]

method fetchArray [line 95]

array fetchArray( )

the implemetation must returns the query results



Tags:

access:  public


[ Top ]

method getDB [line 70]

object|resource getDB( )

The implementation must return the DB link or DB object



Tags:

return:  either a Dbms object or a resource link
access:  public


[ Top ]

method getLastId [line 117]

int getLastId( )

the implementation must return the last inserted primary key value



Tags:

access:  public


[ Top ]

method getTableDesc [line 110]

array getTableDesc( sint $table)

the implementation must an array containing the table properties

query database for a description of the $table schems

like a : DESC $table; DESCRIBE $table; SHOW $table;




Tags:

access:  public


Parameters:

sint   $table   the table name to work on

[ Top ]

method insert [line 154]

TRUE insert( PMO_Object $object)

the implementation must insert new data in database corresponding to the PMO_Object all primary keys must be fill.



Tags:

throws:  Exception
access:  public


Parameters:

PMO_Object   $object  

[ Top ]

method load [line 126]

void load( PMO_Object $object)

the implementation must load data from the database and fill the passed in PMO_Object with it



Tags:

throws:  Exception
access:  public


Parameters:

PMO_Object   $object  

[ Top ]

method query [line 88]

bool query( string $query)

The implementation must implement a method that will execute an SQL query and return true if everything is ok or thow an eception if no result is found



Tags:

return:  true if results are found
throws:  Exception if no result is found
access:  public


Parameters:

string   $query   the SQL query to execute

[ Top ]

method rollback [line 164]

void rollback( )

the implementation must rollback an already stated transaction



Tags:

access:  public


[ Top ]

method setDB [line 77]

void setDB( object|resource $object)

The implementation must set a DB link or DD object



Tags:

access:  public


Parameters:

object|resource   $object  

[ Top ]

method update [line 135]

TRUE update( PMO_Object $object)

the implementation must update the data corresponding to the PMO_Object in database All primary keys must be fill.



Tags:

throws:  Exception
access:  public


Parameters:

PMO_Object   $object  

[ Top ]


Documentation generated on Wed, 15 Oct 2008 09:15:37 -0400 by phpDocumentor 1.4.1