[ Index ]

PHP Cross Reference of MediaWiki-1.24.0

title

Body

[close]

/includes/db/ -> CloneDatabase.php (summary)

(no description)

File Size: 153 lines (5 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

CloneDatabase:: (7 methods):
  __construct()
  useTemporaryTables()
  cloneTableStructure()
  destroy()
  changePrefix()
  changeLBPrefix()
  changeDBPrefix()


Class: CloneDatabase  - X-Ref

Helper class for making a copy of the database, mostly for unit testing.

Copyright © 2010 Chad Horohoe <[email protected]>
https://www.mediawiki.org/

This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 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 General Public License for more details.

You should have received a copy of the GNU General Public License along
with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
http://www.gnu.org/copyleft/gpl.html

__construct( DatabaseBase $db, array $tablesToClone,$newTablePrefix, $oldTablePrefix = '', $dropCurrentTables = true)   X-Ref
Constructor

param: DatabaseBase $db A database subclass
param: array $tablesToClone An array of tables to clone, unprefixed
param: string $newTablePrefix Prefix to assign to the tables
param: string $oldTablePrefix Prefix on current tables, if not $wgDBprefix
param: bool $dropCurrentTables

useTemporaryTables( $u = true )   X-Ref
Set whether to use temporary tables or not

param: bool $u Use temporary tables when cloning the structure

cloneTableStructure()   X-Ref
Clone the table structure


destroy( $dropTables = false )   X-Ref
Change the prefix back to the original.

param: bool $dropTables Optionally drop the tables we created

changePrefix( $prefix )   X-Ref
Change the table prefix on all open DB connections/

param: string $prefix
return: void

changeLBPrefix( $lb, $prefix )   X-Ref

param: LoadBalancer $lb
param: string $prefix
return: void

changeDBPrefix( $db, $prefix )   X-Ref

param: DatabaseBase $db
param: string $prefix
return: void



Generated: Fri Nov 28 14:03:12 2014 Cross-referenced by PHPXref 0.7.1