PHP Класс DbPatch_Command_Patch_Abstract

Автор: Sandy Pleyte
Автор: Martijn De Letter
Автор: Rudi de Vries
Показать файл Открыть проект

Защищенные свойства (Protected)

Свойство Тип Описание
$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