PHP Class DbPatch_Command_Update

Author: Sandy Pleyte
Author: Martijn De Letter
Inheritance: extends DbPatch_Command_Abstract
Datei anzeigen Open project: dbpatch/dbpatch Class Usage Examples

Public Methods

Method Description
execute ( ) : void
showHelp ( string $command = 'update' ) : void

Protected Methods

Method Description
getAppliedPatches ( integer $limit, string $branch = '' ) : array Return the already applied patches from the changelog table
getLastPatchNumber ( string $branch ) : integer Returns the last applied patch number from the database
getPatchNumbersToSkip ( array $params, array $patchFiles ) : array Determine which patch numbers can be skipped We may only skip numbers that are ready to apply

Method Details

execute() public method

public execute ( ) : void
return void

getAppliedPatches() protected method

Return the already applied patches from the changelog table
protected getAppliedPatches ( integer $limit, string $branch = '' ) : array
$limit integer
$branch string
return array

getLastPatchNumber() protected method

Returns the last applied patch number from the database
protected getLastPatchNumber ( string $branch ) : integer
$branch string
return integer

getPatchNumbersToSkip() protected method

These patches will not be executed and marked as skipped in the changelog
protected getPatchNumbersToSkip ( array $params, array $patchFiles ) : array
$params array commandline params
$patchFiles array patches that are ready to apply
return array $patchNumbers patchnumbers to skip

showHelp() public method

public showHelp ( string $command = 'update' ) : void
$command string Command name
return void