File for checking and executing (new) patches.

package Gems
subpackage Util
copyright Copyright (c) 2011 Erasmus MC
license New BSD License
since Class available since version 1.1

 Methods

__construct()

__construct(\Zend_Db_Adapter_Abstract $db, mixed $files, array $databases) 

Parameters

$db

\Zend_Db_Adapter_Abstract

$files

mixed

Array of file names or single file name

$databases

array

Nested array with rowes containing path, name and db keys.

Get the database for a location

getPatchDatabase(string $location) : \Zend_Db_Adapter_Abstract

Parameters

$location

string

Returns

\Zend_Db_Adapter_Abstract

There exist files with patches to load

hasPatchFiles() : boolean

Returns

boolean

Loads execution of selected db patches for the given $patchLevel into a TaskBatch.

loadPatchBatch(integer $patchLevel, boolean $ignoreCompleted, boolean $ignoreExecuted, \MUtil_Task_TaskBatch $batch) : \MUtil_Task_TaskBatch

Parameters

$patchLevel

integer

Only execute patches for this patchlevel

$ignoreCompleted

boolean

Set to yes to skip patches that where already completed

$ignoreExecuted

boolean

Set to yes to skip patches that where already executed (this includes the ones that are executed but not completed)

$batch

\MUtil_Task_TaskBatch

Optional batch, otherwise one is created

Returns

\MUtil_Task_TaskBatchThe batch

Load all (new and changed) patches from all patch files into permanent storage in the database

uploadPatches(integer $applicationLevel) 

Parameters

$applicationLevel

integer

Highest level of patches to load (no loading of future patches)

New installations should not be trequired to run patches. This esthablishes that level.

getMinimumPatchLevel() : integer

Returns

integerThe lowest level of patch stored in the database.

Load all patches from a single patch file

_loadPatchFile(string $file, string $location, integer $minimumLevel, integer $maximumLevel) 

Parameters

$file

string

Full filename

$location

string

Location description

$minimumLevel

integer

$maximumLevel

integer

Load all patches from all patch files with the range

_loadPatches(integer $minimumLevel, integer $maximumLevel) 

Parameters

$minimumLevel

integer

$maximumLevel

integer

 Properties

 

$db

$db : \Zend_Db_Adapter_Abstract

Default

 

Of location => \Zend_Db_Adapter_Abstract db

$patch_databases : array

Default

 

Of file => location

$patch_sources : array

Default

 

$_loaded_patches

$_loaded_patches : array

Default