$conn = ConnectionManager::get('default'); // トランザクション開始 $conn->begin(); try { if (error) { throw new Exception(); } // コミット $conn->commit(); } catch (Exception $e) { // ロールバック $conn->rollback(); }