PHP Class DbPatch_Core_Db

Author: Sandy Pleyte
Author: Martijn De Letter
Afficher le fichier Open project: dbpatch/dbpatch Class Usage Examples

Protected Properties

Свойство Type Description
$adapter null | Zend_Db_Adapter_Abstract
$config Zend_Config

Méthodes publiques

Méthode Description
__construct ( Zend_Config | Zend_Config_Ini | Zend_Config_Xml $config ) : void
dump ( string $filename ) : boolean Dump database to file
getAdapter ( ) : null | Zend_Db_Adapter_Abstract
getConfig ( ) : Zend_Config
import ( string $filename ) : boolean Import a SQL file
reconnect ( ) : DbPatch_Core_Db Reconnect to the database, this will create a new adapter instance.

Méthodes protégées

Méthode Description
enableOldConfigCompatibility ( ) : DbPatch_Core_Db This method provides backward compatibility for the 'bin_dir' configuration option. it could be removed in future versions. using bin_dir only is not sufficient because it limits the user to mysql/mysqldump. it's also not possible to use bin_dir and pass a Zend_Db_Adapter instance as configuration value.
getCliCommand ( string $command, string $filename ) : string

Method Details

__construct() public méthode

public __construct ( Zend_Config | Zend_Config_Ini | Zend_Config_Xml $config ) : void
$config Zend_Config | Zend_Config_Ini | Zend_Config_Xml
Résultat void

dump() public méthode

Dump database to file
public dump ( string $filename ) : boolean
$filename string
Résultat boolean

enableOldConfigCompatibility() protected méthode

This method provides backward compatibility for the 'bin_dir' configuration option. it could be removed in future versions. using bin_dir only is not sufficient because it limits the user to mysql/mysqldump. it's also not possible to use bin_dir and pass a Zend_Db_Adapter instance as configuration value.
protected enableOldConfigCompatibility ( ) : DbPatch_Core_Db
Résultat DbPatch_Core_Db

getAdapter() public méthode

public getAdapter ( ) : null | Zend_Db_Adapter_Abstract
Résultat null | Zend_Db_Adapter_Abstract

getCliCommand() protected méthode

protected getCliCommand ( string $command, string $filename ) : string
$command string Shell command template to execute, takes :configkey notation
$filename string Filename of patch or dump file
Résultat string Command to execute

getConfig() public méthode

public getConfig ( ) : Zend_Config
Résultat Zend_Config

import() public méthode

Import a SQL file
public import ( string $filename ) : boolean
$filename string
Résultat boolean

reconnect() public méthode

Reconnect to the database, this will create a new adapter instance.
public reconnect ( ) : DbPatch_Core_Db
Résultat DbPatch_Core_Db

Property Details

$adapter protected_oe property

protected null|Zend_Db_Adapter_Abstract $adapter
Résultat null | Zend_Db_Adapter_Abstract

$config protected_oe property

protected Zend_Config $config
Résultat Zend_Config