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)
mixedA container acting as source for \MUtil_Registry_Source
arrayThe directories where to look for requested classes
__get($name)
addPrefixPath(string $prefix, $path, boolean $prepend = true) : \Gems_Loader_LoaderAbstract
string
booleanPut 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
stringName of resource to set
mixedThe resource.
booleanTrue if $resource was OKcheckRegistryRequestsAnswers() : boolean
booleanFalse 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.
stringThe context to execute the upgrades for
integernullThe level to upgrade to
integernullThe level to start the upgrade on
falseintegerThe achieved upgrade level or false on failuregetContext() : string
stringgetLevel(string $context) : integer
string
integergetMaxLevel(string|null $context = null) : integer
stringnull
integergetMessages() : array
arraygetNextLevel(\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
\typegetRegistryRequests() : array
Returns those object variables defined by the subclass but not at the level of this definition.
Can be overruled.
arrayof string namesgetUpgrades(string $context = null) : array
string
arraygetUpgradesInfo(string $requestedContext = null) : array
string
arrayregister(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.
arraystringA valid callback, either string for a method of the current class or array otherwise
stringA descriptive message about what this upgrade does
integerThe number of the upgrade
stringThe context to which this upgrade applies
booleansetBatch(\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
arrayprefix => path
stringThe sub directories to cascade to
booleanAllows full class name specification instead of just plugin name part
arrayprefix => path_getClass(string $name, string $className= null, array $arguments= array()) : mixed
stringThe $name of the variable to store this object in.
stringClass name or null if the same as $name, prepending $this->_dirs.
arrayClass initialization arguments.
mixedInstance 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
booleansetLevel(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