PHP Класс Scalr\Upgrade\UpgradeHandler

С версии: 4.5.0 (10.10.2013)
Автор: Vitaliy Demidov ([email protected])
Показать файл Открыть проект Примеры использования класса

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

Свойство Тип Описание
$console Scalr\Upgrade\Console Console
$db ADODB_mysqli Database instance

Открытые методы

Метод Описание
__construct ( object $opt ) Constructor
checkFilesystemStorage ( ) Checks filesystem storage
checkPid ( ) : boolean Checks and creates pid file
getPathToUpdates ( ) : string Gets path to updates
removePid ( ) Removes pid
run ( ) : boolean Runs upgrade process

Защищенные методы

Метод Описание
applyUpdate ( Scalr\Upgrade\AbstractUpdate $upd ) : boolean Applies update
getLastDate ( ) : string Gets last datetime which has been processed
loadUpdates ( ) Loads updates from the implemented classes

Приватные методы

Метод Описание
fetchMysqlStatusBefore ( string $service = 'adodb' ) Getches statuses of the previous updates for specified database service from container
fetchStatusBefore ( ) Fetches statuses of the previous updates
isOutdatedPid ( string $timestamp ) : boolean Checks if pid is outdated

Описание методов

__construct() публичный Метод

Constructor
public __construct ( object $opt )
$opt object Run options

applyUpdate() защищенный Метод

Applies update
protected applyUpdate ( Scalr\Upgrade\AbstractUpdate $upd ) : boolean
$upd Scalr\Upgrade\AbstractUpdate Update to apply
Результат boolean Returns true if update is successful, false otherwise

checkFilesystemStorage() публичный статический Метод

Checks filesystem storage
public static checkFilesystemStorage ( )

checkPid() публичный статический Метод

Checks and creates pid file
public static checkPid ( ) : boolean
Результат boolean Returns false if process has already been started or creates a new pid file

getLastDate() защищенный Метод

Gets last datetime which has been processed
protected getLastDate ( ) : string
Результат string Returns UTC in format 'YYYY-MM-DD HH:ii:ss'

getPathToUpdates() публичный статический Метод

Gets path to updates
public static getPathToUpdates ( ) : string
Результат string Returns path to updates without trailing slash

loadUpdates() защищенный Метод

Loads updates from the implemented classes
protected loadUpdates ( )

removePid() публичный статический Метод

Removes pid
public static removePid ( )

run() публичный Метод

Runs upgrade process
public run ( ) : boolean
Результат boolean Returns true if all updates completed successfully, false otherwise

Описание свойств

$console защищенное свойство

Console
protected Console,Scalr\Upgrade $console
Результат Scalr\Upgrade\Console

$db защищенное свойство

Database instance
protected ADODB_mysqli $db
Результат ADODB_mysqli