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

Class: MySQLDatabaseHost

Source Location: /databases/mysql/MySQLDatabaseHost.class.php

Class Overview

ABSTDatabaseHost
   |
   --MySQLDatabaseHost



Author(s):

Version:

  • 0.2.0

Copyright:

  • Copyright (C) 2004 Daniel Plücken <daniel@debakel.net>

    This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License.

    This library 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 Lesser General Public License for more details.

    You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA

Variables

Methods


Inherited Variables

Inherited Methods

Class: ABSTDatabaseHost

ABSTDatabaseHost::ABSTDatabaseHost()
Fake-Constructor
ABSTDatabaseHost::addDB()
Adds a database's reference to this object of a database host.
ABSTDatabaseHost::getHost()
Returns the hostname.
ABSTDatabaseHost::getName()
Returns the hostname. This method is an alias of the method getHost().
ABSTDatabaseHost::getPassword()
Returns the given password which should be usedto connect to the host.
ABSTDatabaseHost::getPort()
Returns the specified port to use to connect to the host.
ABSTDatabaseHost::getResourceID()
Returns the id of the connection resource to the database host.
ABSTDatabaseHost::getUser()
Returns the specified user who should connect with to the host.
ABSTDatabaseHost::setConnectionErrorCallback()
Sets the name of the function that should be invoked on a connection error.
ABSTDatabaseHost::setHost()
Sets the hostname.
ABSTDatabaseHost::setName()
Sets the hostname. This method is an alias of the method setHost( $string ).
ABSTDatabaseHost::setPassword()
Sets the password that should be used to connect to the host.
ABSTDatabaseHost::setPort()
Specifies the port that should be used to connect to the host.
ABSTDatabaseHost::setUser()
Specifies the user who should connect with to the host.
ABSTDatabaseHost::__constructor()
Constructor.

Class Details

[line 73]


Tags:

author:  Daniel Plücken <daniel@debakel.net>
version:  0.2.0
copyright:  

Copyright (C) 2004 Daniel Plücken <daniel@debakel.net>

This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License.

This library 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 Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA

license:  GNU Lesser General Public License


[ Top ]


Class Variables

$bool_persistant_connection =  false

[line 89]

Stores whether a persistant connection should be use.



Tags:

access:  private

Type:   FTPHost


[ Top ]

$ftp =  null

[line 82]

This reference of a FTP object is for the use that dumps should save on the server via FTP, cause of SAFE MODE restriction.



Tags:

access:  private

Type:   FTPHost


[ Top ]



Class Methods


constructor MySQLDatabaseHost [line 105]

MySQLDatabaseHost MySQLDatabaseHost( [ $host = "localhost"], [ $user = ""], [ $password = ""], [ $port = 3306], string $host*, string $user*, string $password*, string $port*)

Constructor



Tags:

author:  Daniel Plücken <daniel@debakel.net>
version:  1.1
since:  0.1.0
access:  public


Parameters:

string   $host*  
string   $user*  
string   $password*  
string   $port*  
   $host  
   $user  
   $password  
   $port  

[ Top ]

method addDB [line 150]

void addDB( &$db_obj, object $dbt_obj)

Adds a databasetable's reference to this object of a database.



Tags:

author:  Daniel Plücken <daniel@debakel.net>
version:  1.3
since:  0.1.0
access:  public


Overrides ABSTDatabaseHost::addDB() (Adds a database's reference to this object of a database host.)

Parameters:

object   $dbt_obj  
   &$db_obj  

[ Top ]

method addFTPData [line 459]

void addFTPData( string $host, string $user, string $password, [string $port = 21])

Adds ftp data to this object. This can be useful for writing dumps if the sever has SAFE MODE restrictions.



Tags:

author:  Daniel Plücken <daniel@debakel.net>
version:  1.0
since:  0.1.7
access:  public


Parameters:

string   $host  
string   $user  
string   $password  
string   $port  

[ Top ]

method connect [line 479]

boolean connect( [boolean $boolean_persitant = false])

Opens a connection to the database server.



Tags:

author:  Daniel Plücken <daniel@debakel.net>
version:  1.1
since:  0.1.0
access:  public


Parameters:

boolean   $boolean_persitant  

[ Top ]

method disconnect [line 523]

void disconnect( )

Closes the current connection to the database server.



Tags:

author:  Daniel Plücken <daniel@debakel.net>
version:  1.0
since:  0.1.0
access:  public


[ Top ]

method dump [line 270]

boolean dump( [string $target = "./__dumps"], [string $regExp = ""], [string $regExp2 = ""], [boolean $full_inserts = false], [boolean $drop_order = false])

Dumps this Databasehost. If this object has stored ftp data the dump method

"PHP" will be used and the dumps will be stored on the ftp server which is stated in the ftp data. Otherwise you can use two different methods to store the created dumps depending on the value of the constant "MYSQL_DUMP_KIND", which can be modified in the file "settings.inc.php". You can use the fast "MYSQLDUMP" method, if your hosting allows to use the function exec() and you have quoted the right path to mysqldump in the constant "PATH2MYSQLDUMP", also changeable in the file "settings.inc.php", or you can use the method "PHP". The method "PHP" do not need an external program but is slower than the method "MYSQLDUMP".




Tags:

author:  Daniel Plücken <daniel@debakel.net>
version:  1.2
since:  0.1.4
access:  public


Parameters:

string   $target  
string   $regExp   Makes sure that only databases were stored, which names matching the given regular expression.
string   $regExp2   Makes sure that only tables of a Database were stored, which names matching the given regular expression.
boolean   $full_inserts  
boolean   $drop_order  

[ Top ]

method importDump [line 421]

boolean importDump( [string $source = "./__dumps"], [string $regExpFolder = ""], [string $regExpFiles = ""])

Researches a whole folder to import dumped data from it.



Tags:

author:  Daniel Plücken <daniel@debakel.net>
version:  1.0
since:  0.1.9
access:  public


Parameters:

string   $source   The source folder
string   $regExpFolder   Makes sure that only folder will be imported, which names matching the given regular expression.
string   $regExpFiles   Makes sure that only files will be imported, which names matching the given regular expression.

[ Top ]

method researchDatabases [line 193]

void researchDatabases( [string $regExp = ""], [string $regExp2 = ""], [boolean $resTab = true], [boolean $resFld = false])

Sets the references to objects of databases to the attribute $this -> db.



Tags:

author:  Daniel Plücken <daniel@debakel.net>
version:  1.1
since:  0.1.3
access:  public


Parameters:

string   $regExp   Makes sure that only databases were stored, which names matching the given regular expression.
string   $regExp2   Makes sure that only tables of a Database were stored, which names matching the given regular expression.
boolean   $resTab   Cause whether the tables of the researched databases should be research too.
boolean   $resFld   Cause whether the tables's fields of the researched tables should be research too.

[ Top ]

method setPersistantConnection [line 132]

void setPersistantConnection( [boolean $boolean = true])

Sets whether a persistant connection should be use.



Tags:

author:  Daniel Plücken <daniel@debakel.net>
version:  1.0
since:  0.2.0
access:  public


Parameters:

boolean   $boolean  

[ Top ]


Documentation generated on Thu, 05 Jun 2008 19:14:06 +0200 by phpDocumentor 1.4.1