Short description for Upgrades
Long description for class Upgrades (if any)...
package | Gems |
---|---|
subpackage | Upgrades |
copyright | Copyright (c) 2011 Erasmus MC |
license | New BSD License |
since | Class available since version 1.5 |
inherited_from | \Gems_UpgradesAbstract |
Upgrade143to150()
Upgrade150to151()
Upgrade151to152()
Upgrade152to153()
Upgrade153to154()
Upgrade154to155()
Upgrade155to156()
Upgrade156to157()
Upgrade157to16()
Upgrade161to162()
Upgrade162to163()
Upgrade163to164()
Upgrade164to170()
Upgrade16to161()
Upgrade170to171()
Upgrade171to172()
Upgrade172to181()
__construct()
inherited_from | \Gems_UpgradesAbstract::__construct() |
---|
__construct(mixed $container, array $dirs)
mixed
A container acting as source for \MUtil_Registry_Source
array
The directories where to look for requested classes
__get($name)
addPrefixPath(string $prefix, $path, boolean $prepend = true
) : \Gems_Loader_LoaderAbstract
string
boolean
Put path at the beginning of the stack (has no effect when prefix / dir already set)
\Gems_Loader_LoaderAbstract
(continuation pattern)afterRegistry() : void
answerRegistryRequest(string $name, mixed $resource) : boolean
string
Name of resource to set
mixed
The resource.
boolean
True if $resource was OKcheckRegistryRequestsAnswers() : boolean
boolean
False if required values are missing.execute(string $context, integer|null $to= null
, integer|null $from= null
) : false | integer
When no $to or $from are given, the given $context will be upgraded from the current level to the max level. Otherwise the $from and/or $to will be used to determine what upgrades to execute.
string
The context to execute the upgrades for
integer
null
The level to upgrade to
integer
null
The level to start the upgrade on
false
integer
The achieved upgrade level or false on failuregetContext() : string
string
getLevel(string $context) : integer
string
integer
getMaxLevel(string|null $context = null
) : integer
string
null
integer
getMessages() : array
array
getNextLevel(\type $context= null
, \type $level= null
) : \type
When context is null, it will get the current context When level is null, it will get the current level
\type
\type
\type
getRegistryRequests() : array
Returns those object variables defined by the subclass but not at the level of this definition.
Can be overruled.
array
of string namesgetUpgrades(string $context = null
) : array
string
array
getUpgradesInfo(string $requestedContext = null
) : array
string
array
register(array|string $callback, string $info= null
, integer $index= null
, string $context= null
) : boolean
Index and context are optional and will be generated when omitted. For the user interface to be clear $info should provide a good description of what the upgrade does.
array
string
A valid callback, either string for a method of the current class or array otherwise
string
A descriptive message about what this upgrade does
integer
The number of the upgrade
string
The context to which this upgrade applies
boolean
setBatch(\Gems_Task_TaskRunnerBatch $batch)
\Gems_Task_TaskRunnerBatch
setContext(string $context)
Usefull when adding upgrades in the construct to save typing
string
_(string $messageId, \type $locale = null
) : string
string
\type
string
_cascadedDirs(array $dirs, string $cascade, boolean $fullClassnameFallback = true
) : array
array
prefix => path
string
The sub directories to cascade to
boolean
Allows full class name specification instead of just plugin name part
array
prefix => path_getClass(string $name, string $className= null
, array $arguments= array()
) : mixed
string
The $name of the variable to store this object in.
string
Class name or null if the same as $name, prepending $this->_dirs.
array
Class initialization arguments.
mixed
Instance of $className_loadClass(string $name, boolean $create= false
, array $arguments= array()
) : mixed
addMessage(string $message)
string
clearMessages()
filterRequestNames(string $name) : boolean
Can be overriden.
string
boolean
setLevel(string $context, integer $level= null
, boolean $force= false
)
Will only update when the $level is higher than the achieved level, unless when $force = true when it will always update.
string
integer
boolean
$db : \Zend_Db_Adapter_Abstract
$loader : \Gems_Loader
$project : \Gems_Project_ProjectSettings
$translate : \Zend_Translate_Adapter
$_batch : \Gems_Task_TaskRunnerBatch
$_context
null
$_dirs : array
The standard value is
But an alternative could be:
$_info : \Zend_Config_Ini
$_loader : \MUtil_Loader_PluginLoader
$_upgradeStack
array()
$cascade : string
null
$originalFile : \Zend_Config
$upgradeFile : \Zend_Config