PHP 클래스 DbPatch_Command_Abstract

저자: Sandy Pleyte
저자: Martijn De Letter
파일 보기 프로젝트 열기: dbpatch/dbpatch 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$config Zend_Config | Zend_Config_Ini | Zend_Config_Xml
$console DbPatch_Core_Console
$db DbPatch_Core_Db
$options array
$writer DbPatch_Core_Writer

공개 메소드들

메소드 설명
execute ( ) : void
getBranch ( ) : string
getConfig ( ) : null | Zend_Config | Zend_Config_Ini | Zend_Config_Xml
getConsole ( ) : DbPatch_Core_Console | null
getDb ( ) : null | Zend_Db_Adapter_Abstract
getOptions ( ) : array
getPatch ( integer $patchNumber, string $branch ) : boolean | DbPatch_Command_Patch_Abstract
getPatchDirectory ( ) : string | boolean
getPatchPrefix ( ) : string
getPatches ( string $branch, null | integer $searchPatchNumber = null ) : array
getWriter ( ) : DbPatch_Core_Writer | null
init ( ) : DbPatch_Command_Abstract
setConfig ( Zend_Config | Zend_Config_Ini | Zend_Config_Xml $config ) : DbPatch_Command_Abstract
setConsole ( DbPatch_Core_Console $console ) : DbPatch_Command_Abstract
setDb ( DbPatch_Core_Db $db ) : DbPatch_Command_Abstract
setOptions ( $options ) : void
setWriter ( DbPatch_Core_Writer $writer ) : DbPatch_Command_Abstract
trimTrailingSlashes ( string $str ) : string Remove trailing slash from string

보호된 메소드들

메소드 설명
addToChangelog ( array $patchFile, string $description = null ) : void Store patchfile entry to the changelog table
changelogExists ( ) : boolean Checks if the changelog table is present in the database
createChangelog ( ) : boolean Try to create the changelog table
detectBranches ( ) : array Detect the different branches that are used in the patch dir the default branch is always returned
dumpDatabase ( string $filename, $noData = false ) : boolean Dump database
getDumpFilename ( ) : string Create dump filename
isPatchApplied ( integer $patchNumber, string $branch ) : boolean Check if the passed patch number can be found in the changelog table for the specified branch
showHelp ( string $command = null ) : void Show help options for a given command
updateColumnType ( ) Check column types return void
validateChangelog ( ) : boolean Validate if the changelog is present in the database if not try to create the table

메소드 상세

addToChangelog() 보호된 메소드

Store patchfile entry to the changelog table
protected addToChangelog ( array $patchFile, string $description = null ) : void
$patchFile array
$description string
리턴 void

changelogExists() 보호된 메소드

Checks if the changelog table is present in the database
protected changelogExists ( ) : boolean
리턴 boolean

createChangelog() 보호된 메소드

Try to create the changelog table
protected createChangelog ( ) : boolean
리턴 boolean

detectBranches() 보호된 메소드

Detect the different branches that are used in the patch dir the default branch is always returned
protected detectBranches ( ) : array
리턴 array

dumpDatabase() 보호된 메소드

Dump database
protected dumpDatabase ( string $filename, $noData = false ) : boolean
$filename string
리턴 boolean

execute() 추상적인 공개 메소드

abstract public execute ( ) : void
리턴 void

getBranch() 공개 메소드

public getBranch ( ) : string
리턴 string

getConfig() 공개 메소드

public getConfig ( ) : null | Zend_Config | Zend_Config_Ini | Zend_Config_Xml
리턴 null | Zend_Config | Zend_Config_Ini | Zend_Config_Xml

getConsole() 공개 메소드

public getConsole ( ) : DbPatch_Core_Console | null
리턴 DbPatch_Core_Console | null

getDb() 공개 메소드

public getDb ( ) : null | Zend_Db_Adapter_Abstract
리턴 null | Zend_Db_Adapter_Abstract

getDumpFilename() 보호된 메소드

Create dump filename
protected getDumpFilename ( ) : string
리턴 string

getOptions() 공개 메소드

public getOptions ( ) : array
리턴 array

getPatch() 공개 메소드

public getPatch ( integer $patchNumber, string $branch ) : boolean | DbPatch_Command_Patch_Abstract
$patchNumber integer
$branch string
리턴 boolean | DbPatch_Command_Patch_Abstract

getPatchDirectory() 공개 메소드

public getPatchDirectory ( ) : string | boolean
리턴 string | boolean

getPatchPrefix() 공개 메소드

public getPatchPrefix ( ) : string
리턴 string

getPatches() 공개 메소드

public getPatches ( string $branch, null | integer $searchPatchNumber = null ) : array
$branch string
$searchPatchNumber null | integer
리턴 array

getWriter() 공개 메소드

public getWriter ( ) : DbPatch_Core_Writer | null
리턴 DbPatch_Core_Writer | null

init() 공개 메소드

public init ( ) : DbPatch_Command_Abstract
리턴 DbPatch_Command_Abstract

isPatchApplied() 보호된 메소드

Check if the passed patch number can be found in the changelog table for the specified branch
protected isPatchApplied ( integer $patchNumber, string $branch ) : boolean
$patchNumber integer
$branch string
리턴 boolean $result true if patch already applied; false if not

setConfig() 공개 메소드

public setConfig ( Zend_Config | Zend_Config_Ini | Zend_Config_Xml $config ) : DbPatch_Command_Abstract
$config Zend_Config | Zend_Config_Ini | Zend_Config_Xml
리턴 DbPatch_Command_Abstract

setConsole() 공개 메소드

public setConsole ( DbPatch_Core_Console $console ) : DbPatch_Command_Abstract
$console DbPatch_Core_Console
리턴 DbPatch_Command_Abstract

setDb() 공개 메소드

public setDb ( DbPatch_Core_Db $db ) : DbPatch_Command_Abstract
$db DbPatch_Core_Db
리턴 DbPatch_Command_Abstract

setOptions() 공개 메소드

public setOptions ( $options ) : void
$options
리턴 void

setWriter() 공개 메소드

public setWriter ( DbPatch_Core_Writer $writer ) : DbPatch_Command_Abstract
$writer DbPatch_Core_Writer
리턴 DbPatch_Command_Abstract

showHelp() 보호된 메소드

Show help options for a given command
protected showHelp ( string $command = null ) : void
$command string
리턴 void

trimTrailingSlashes() 공개 메소드

Remove trailing slash from string
public trimTrailingSlashes ( string $str ) : string
$str string String
리턴 string

updateColumnType() 보호된 메소드

Check column types return void
protected updateColumnType ( )

validateChangelog() 보호된 메소드

Validate if the changelog is present in the database if not try to create the table
protected validateChangelog ( ) : boolean
리턴 boolean

프로퍼티 상세

$config 보호되어 있는 프로퍼티

protected Zend_Config|Zend_Config_Ini|Zend_Config_Xml $config
리턴 Zend_Config | Zend_Config_Ini | Zend_Config_Xml

$console 보호되어 있는 프로퍼티

protected DbPatch_Core_Console $console
리턴 DbPatch_Core_Console

$db 보호되어 있는 프로퍼티

protected DbPatch_Core_Db $db
리턴 DbPatch_Core_Db

$options 보호되어 있는 프로퍼티

protected array $options
리턴 array

$writer 보호되어 있는 프로퍼티

protected DbPatch_Core_Writer $writer
리턴 DbPatch_Core_Writer