Go to the documentation of this file.00001 <?php
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015 class firebirdTransaction
00016 {
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027 private $objAutoCommit;
00028
00029
00030
00031
00032
00033
00034
00035 private $objConnection;
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048 public function __construct( $connection, $autocommit )
00049 {
00050 $this->objAutoCommit = $autocommit;
00051 $this->objConnection = $connection;
00052 }
00053
00054
00055
00056
00057
00058
00059
00060
00061 public function commit( $savepoint_array=false )
00062 {
00063 if ( $savepoint_array )
00064 {
00065 foreach ( $savepoint_array as $objSavepoints )
00066 ibase_commit( $objSavepoints );
00067 }
00068
00069 if ( is_resource( $this->objAutoCommit ) )
00070 return ibase_commit( $this->objAutoCommit );
00071 }
00072
00073
00074
00075
00076
00077
00078
00079
00080
00081 public function rollback( $savepoint=false, $savepoint_array=false )
00082 {
00083 if ( is_array( $savepoint_array ) )
00084 {
00085 foreach ( $savepoint_array as $objSavepoints )
00086 ibase_rollback( $objSavepoints );
00087 }
00088
00089 if ( is_resource( $this->objAutoCommit ) )
00090 return ibase_commit( $this->objConnection );
00091 }
00092
00093
00094
00095
00096
00097
00098
00099 public function savepoint()
00100 {
00101 return ibase_trans( $this->objConnection );
00102 }
00103 }
00104
00105 ?>