PHP 클래스 DbPatch_Command_Patch_Abstract

저자: Sandy Pleyte
저자: Martijn De Letter
저자: Rudi de Vries
파일 보기 프로젝트 열기: dbpatch/dbpatch

보호된 프로퍼티들

프로퍼티 타입 설명
$config null | DbPatch_Core_Config
$data array
$db null | Zend_Db_Adapter_Abstract
$writer null | DbPatch_Core_Writer

공개 메소드들

메소드 설명
__construct ( array $values = null ) : void Creates a new value object
__get ( string $name ) : mixed Returns the value requested.
__isset ( string $name ) : boolean Check if a value isset
__set ( string $name, mixed $value ) Sets the value provided.
apply ( ) : void
getConfig ( ) : DbPatch_Core_Config | null
getContents ( ) : string
getDb ( ) : null | DbPatch_Core_Db
getFields ( ) : array Returns the field names of the data array.
getHash ( ) : string Retrieve a file hash
getType ( ) : void
getWriter ( ) : DbPatch_Core_Writer | null
loadFromArray ( array $values ) : void Load the values from an array provided.
setConfig ( DbPatch_Core_Config $config ) : DbPatch_Command_Patch_Abstract
setDb ( DbPatch_Core_Db $db ) : DbPatch_Command_Patch_Abstract
setWriter ( DbPatch_Core_Writer $writer ) : DbPatch_Command_Patch_Abstract
show ( ) : void Echo contents of the patch
toArray ( ) : array Returns the objects values as an array.

보호된 메소드들

메소드 설명
fileExists ( string $filename ) : boolean
from_camel_case ( string $str ) : string Translates a camel case string into a string with underscores (e.g. firstName -> first_name)
getComment ( integer $lineNumber ) : string Extract the first line of comment out of a patch file
getPatchFilename ( string $patchPrefix, string $extension, integer $patchNumberSize = 4 ) : string
getPatchNumberSize ( string $patchDirectory ) : integer
to_camel_case ( string $str, boolean $capitalise_first_char = false ) : string Translates a string with underscores into camel case (e.g. first_name -> firstName)
writeFile ( string $filename, string $content ) : void Create empty patch

메소드 상세

__construct() 공개 메소드

Creates a new value object
public __construct ( array $values = null ) : void
$values array the values to fill the value object with. If left empty we're creating an empty value object.
리턴 void

__get() 공개 메소드

Returns the value requested.
public __get ( string $name ) : mixed
$name string the name of the property
리턴 mixed the value

__isset() 공개 메소드

Check if a value isset
public __isset ( string $name ) : boolean
$name string Name of the property
리턴 boolean

__set() 공개 메소드

Sets the value provided.
public __set ( string $name, mixed $value )
$name string name of the property
$value mixed the value

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

abstract public apply ( ) : void
리턴 void

fileExists() 보호된 메소드

protected fileExists ( string $filename ) : boolean
$filename string
리턴 boolean

from_camel_case() 보호된 메소드

Translates a camel case string into a string with underscores (e.g. firstName -> first_name)
protected from_camel_case ( string $str ) : string
$str string String in camel case format
리턴 string $str Translated into underscore format

getComment() 보호된 메소드

Extract the first line of comment out of a patch file
protected getComment ( integer $lineNumber ) : string
$lineNumber integer Line number where the comment is
리턴 string

getConfig() 공개 메소드

public getConfig ( ) : DbPatch_Core_Config | null
리턴 DbPatch_Core_Config | null

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

abstract public getContents ( ) : string
리턴 string

getDb() 공개 메소드

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

getFields() 공개 메소드

Returns the field names of the data array.
public getFields ( ) : array
리턴 array

getHash() 공개 메소드

Retrieve a file hash
public getHash ( ) : string
리턴 string

getPatchFilename() 보호된 메소드

protected getPatchFilename ( string $patchPrefix, string $extension, integer $patchNumberSize = 4 ) : string
$patchPrefix string
$extension string
$patchNumberSize integer
리턴 string

getPatchNumberSize() 보호된 메소드

protected getPatchNumberSize ( string $patchDirectory ) : integer
$patchDirectory string
리턴 integer

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

abstract public getType ( ) : void
리턴 void

getWriter() 공개 메소드

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

loadFromArray() 공개 메소드

Load the values from an array provided.
public loadFromArray ( array $values ) : void
$values array the values we're using to set the values in the value object
리턴 void

setConfig() 공개 메소드

public setConfig ( DbPatch_Core_Config $config ) : DbPatch_Command_Patch_Abstract
$config DbPatch_Core_Config
리턴 DbPatch_Command_Patch_Abstract

setDb() 공개 메소드

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

setWriter() 공개 메소드

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

show() 공개 메소드

Echo contents of the patch
public show ( ) : void
리턴 void

toArray() 공개 메소드

Returns the objects values as an array.
public toArray ( ) : array
리턴 array

to_camel_case() 보호된 메소드

Translates a string with underscores into camel case (e.g. first_name -> firstName)
protected to_camel_case ( string $str, boolean $capitalise_first_char = false ) : string
$str string String in underscore format
$capitalise_first_char boolean If true, capitalise the first char in $str
리턴 string $str translated into camel caps

writeFile() 보호된 메소드

Create empty patch
protected writeFile ( string $filename, string $content ) : void
$filename string
$content string
리턴 void

프로퍼티 상세

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

protected null|DbPatch_Core_Config $config
리턴 null | DbPatch_Core_Config

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

protected array $data
리턴 array

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

protected null|Zend_Db_Adapter_Abstract $db
리턴 null | Zend_Db_Adapter_Abstract

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

protected null|DbPatch_Core_Writer $writer
리턴 null | DbPatch_Core_Writer