Page MenuHomePhorge

kolab_sync_db.php
No OneTemporary

Authored By
Unknown
Size
2 KB
Referenced Files
None
Subscribers
None

kolab_sync_db.php

<?php
/**
+--------------------------------------------------------------------------+
| Kolab Sync (ActiveSync for Kolab) |
| |
| Copyright (C) 2011-2012, Kolab Systems AG <contact@kolabsys.com> |
| |
| This program is free software: you can redistribute it and/or modify |
| it under the terms of the GNU Affero General Public License as published |
| by the Free Software Foundation, either version 3 of the License, or |
| (at your option) any later version. |
| |
| This program is distributed in the hope that it will be useful, |
| but WITHOUT ANY WARRANTY; without even the implied warranty of |
| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| GNU Affero General Public License for more details. |
| |
| You should have received a copy of the GNU Affero General Public License |
| along with this program. If not, see <http://www.gnu.org/licenses/> |
+--------------------------------------------------------------------------+
| Author: Aleksander Machniak <machniak@kolabsys.com> |
+--------------------------------------------------------------------------+
*/
/**
* Database layer wrapper with transaction support
*/
class kolab_sync_db
{
/**
* the database adapter
*
* @var rcube_mdb2
*/
protected $db;
public function __construct()
{
$this->db = rcube::get_instance()->get_dbh();
}
public function beginTransaction()
{
$query = 'BEGIN';
$this->db->query($query);
}
public function commit()
{
$query = 'COMMIT';
$this->db->query($query);
}
public function rollBack()
{
$query = 'ROLLBACK';
$this->db->query($query);
}
}

File Metadata

Mime Type
text/x-php
Expires
Sun, Apr 5, 10:07 PM (2 w, 6 d ago)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
ec/ff/ba1cab7e0af54a1edef8bf8e49f1
Default Alt Text
kolab_sync_db.php (2 KB)

Event Timeline