[ Index ] |
|
Code source de Symfony 1.0.0 |
[Code source] [Imprimer] [Statistiques]
Class that contains some shared/default information for connections. Classes may wish to extend this so as not to worry about the sleep/wakeup methods, etc. In reality this class is not very useful yet, so there's not much incentive for drivers to extend this.
Author: | Hans Lellelid <hans@xmpl.org> |
Version: | $Revision: 1.5 $ |
Poids: | 258 lignes (8 kb) |
Inclus ou requis: | 0 fois |
Référencé: | 0 fois |
Nécessite: | 0 fichiers |
__sleep() X-Ref |
This "magic" method is invoked upon serialize() and works in tandem with the __wakeup() method to ensure that your database connection is serializable. This method returns an array containing the names of any members of your class which need to be serialized in order to allow the class to re-connect to the database when it is unserialized. <p> Developers: Note that you cannot serialize resources (connection links) and expect them to be valid when you unserialize. For this reason, you must re-connect to the database in the __wakeup() method. It's up to your class implimentation to ensure that the necessary data is serialized. You probably at least need to serialize: (1) the DSN array used by connect() method (2) Any flags that were passed to the connection (3) Possibly the autocommit state return: array The class variable names that should be serialized. |
__wakeup() X-Ref |
This "magic" method is invoked upon unserialize(). This method will re-connects to the database using the information that was stored using the __sleep() method. |
getResource() X-Ref |
getDSN() X-Ref |
getFlags() X-Ref |
prepareCall($sql) X-Ref |
Creates a CallableStatement object for calling database stored procedures. param: string $sql return: CallableStatement |
supportsNestedTrans() X-Ref |
Driver classes should override this if they support transactions. return: boolean |
begin() X-Ref |
Begins a transaction (if supported). |
commit() X-Ref |
Commits statements in a transaction. |
rollback() X-Ref |
Rollback changes in a transaction. |
setAutoCommit($bit) X-Ref |
Enable/disable automatic commits. Pushes SQLWarning onto $warnings stack if the autocommit value is being changed mid-transaction. This function is overridden by driver classes so that they can perform the necessary begin/end transaction SQL. If auto-commit is being set to TRUE, then the current transaction will be committed immediately. param: boolean $bit New value for auto commit. return: void |
getAutoCommit() X-Ref |
Get auto-commit status. return: boolean |
beginTrans() X-Ref |
Begin new transaction. Driver classes should override this method if they support transactions. |
commitTrans() X-Ref |
Commit the current transaction. Driver classes should override this method if they support transactions. |
rollbackTrans() X-Ref |
Roll back (undo) the current transaction. Driver classes should override this method if they support transactions. |
isConnected() X-Ref |
Returns false if connection is closed. return: boolean |
Généré le : Fri Mar 16 22:42:14 2007 | par Balluche grâce à PHPXref 0.7 |