default
[ class tree: default ] [ index: default ] [ all elements ]

Class: MySQLDump

Source Location: /lib_dump.php

Class Overview


Dump MySQL database


Author(s):

Version:

  • 2.0 - 02/10/2007

Methods



Class Details

[line 20]
Dump MySQL database

Here is an inline example:

  1.  $connection @mysql_connect($dbhost,$dbuser,$dbpsw);
  2.  $dumper new MySQLDump($dbname,'filename.sql',false,false);
  3.  $dumper->doDump();




Tags:

author:  Daniele Vigaṇ - CreativeFactory.it <daniele.vigano@creativefactory.it> - based on a version by Andrea Ingaglio <andrea@coders4fun.com>
version:  2.0 - 02/10/2007
name:  MySQLDump
license:  GNU Public License


[ Top ]


Class Methods


method doDump [line 255]

void doDump( )

Writes to file the selected database dump



[ Top ]

method getCompress [line 102]

boolean getCompress( )

Returns if the output file is or not compressed



[ Top ]

method getDatabase [line 82]

string getDatabase( )

Returns the database where the class is working on



[ Top ]

method getDatabaseData [line 243]

void getDatabaseData( [boolean $hexValue = true])

Writes to file all the selected database tables data



Parameters:

boolean   $hexValue   It defines if the output is base-16 or not

[ Top ]

method getDatabaseStructure [line 229]

boolean getDatabaseStructure( )

Writes to file all the selected database tables structure



[ Top ]

method getOutputFile [line 122]

string getOutputFile( )

Returns the output filename



[ Top ]

method getTableData [line 167]

void getTableData( string $table, [boolean $hexValue = true])

Writes to file the $table's data



Parameters:

string   $table   The table name
boolean   $hexValue   It defines if the output is base 16 or not

[ Top ]

method getTableStructure [line 130]

void getTableStructure( string $table)

Writes to file the $table's structure



Parameters:

string   $table   The table name

[ Top ]

method MYSQLDump [line 60]

void MYSQLDump( [string $db = null], [string $filepath = 'dump.sql'], [boolean $compress = false], [boolean $hexValue = false])

Class constructor



Parameters:

string   $db   The database name
string   $filepath   The file where the dump will be written
boolean   $compress   It defines if the output file is compress (gzip) or not
boolean   $hexValue   It defines if the outup values are base-16 or not

[ Top ]

method setCompress [line 90]

void setCompress( boolean $compress)

Sets the output file type (It can be made only if the file hasn't been already written)



Parameters:

boolean   $compress   If it's true, the output file will be compressed

[ Top ]

method setDatabase [line 71]

void setDatabase( string $db)

Sets the database to work on



Parameters:

string   $db   The database name

[ Top ]

method setOutputFile [line 110]

void setOutputFile( string $filepath)

Sets the output file



Parameters:

string   $filepath   The file where the dump will be written

[ Top ]

method writeDump [line 267]

void writeDump( $filename)



Tags:

deprecated:  Look at the doDump() method


Parameters:

   $filename  

[ Top ]


Documentation generated on Thu, 04 Oct 2007 11:54:23 +0200 by phpDocumentor 1.4.0a2