wCMF  3.6
 All Classes Namespaces Files Functions Variables Groups Pages
DBUtil Class Reference

Public Member Functions

 executeScript ($file, $initSection)
 

Static Public Member Functions

static copyDatabase ($srcName, $destName, $server, $user, $password)
 
static createDatabase ($name, $server, $user, $password)
 

Detailed Description

DBUtil provides database helper functions.

wCMF - wemove Content Management Framework Copyright (C) 2005-2014 wemove digital solutions GmbH

Licensed under the terms of any of the following licenses at your choice:

See the license.txt file distributed with this work for additional information.

Id:
class.DBUtil.php 1462 2014-02-04 23:52:27Z iherwig
Author
ingo herwig ingo@.nosp@m.wemo.nosp@m.ve.co.nosp@m.m

Definition at line 30 of file class.DBUtil.php.

Member Function Documentation

DBUtil::executeScript (   $file,
  $initSection 
)

Execute a sql script. Execution is done inside a transaction, which is rolled back in case of failure.

Parameters
fileThe filename of the sql script
initSectionThe name of the configuration section that defines the database connection
Returns
True/False wether execution succeeded or not.

Definition at line 38 of file class.DBUtil.php.

References Log\debug(), Log\error(), InifileParser\getInstance(), Log\info(), and WCMFException\throwEx().

+ Here is the call graph for this function:

static DBUtil::copyDatabase (   $srcName,
  $destName,
  $server,
  $user,
  $password 
)
static

Duplicate a database on the same server (same user). This works only for MySQL databases.

Parameters
srcNameThe name of the source database
destNameThe name of the source database
serverThe name of the database server
userThe user name
passwordThe password

Definition at line 107 of file class.DBUtil.php.

References createDatabase(), Log\debug(), and WCMFException\throwEx().

Referenced by CreateInstanceController\executeKernel().

+ Here is the call graph for this function:

static DBUtil::createDatabase (   $name,
  $server,
  $user,
  $password 
)
static

Crate a database on the server. This works only for MySQL databases.

Parameters
nameThe name of the source database
serverThe name of the database server
userThe user name
passwordThe password

Definition at line 158 of file class.DBUtil.php.

References WCMFException\throwEx().

Referenced by copyDatabase().

+ Here is the call graph for this function:


The documentation for this class was generated from the following file: