ModuleStatus
in package
container for module properties, according to a specific entry point configuration.
It represents the state of the module, as known by the application: installation status, the module version known during the last installer launch etc.
Table of Contents
- CONFIG_SCOPE_APP = 0
- the module is configured for any instance.
- CONFIG_SCOPE_LOCAL = 1
- the module is configured only at the instance level (installed by the user, not by the developer).
- FILTER_DISABLED_INSTALLED = 41
- FILTER_DISABLED_UNINSTALLED = 37
- FILTER_ENABLED_INSTALLED_NOT_UPGRADED = 42
- FILTER_ENABLED_INSTALLED_UPGRADED = 26
- FILTER_ENABLED_UNINSTALLED = 38
- FILTER_VAL_DISABLED = 1
- FILTER_VAL_ENABLED = 2
- FILTER_VAL_INSTALLED = 8
- FILTER_VAL_NOTUPGRADED = 32
- FILTER_VAL_UNINSTALLED = 4
- FILTER_VAL_UPGRADED = 16
- $configurationScope : int
- indicate if the module is configured into the app, or only for the instance, so only into local configuration.
- $dbProfile : string
- $isEnabled : bool
- indicate if the module is enabled into the application or not.
- $isInstalled : bool
- indicate if the module is marked as installed.
- $name : string
- $parameters : array<string|int, string>
- $skipInstaller : mixed
- $version : string
- The version of the module that has been installed.
- $path : mixed
- __construct() : mixed
- clearInfos() : mixed
- getName() : mixed
- getPath() : mixed
- getResolverItem() : Item
- saveInfos() : mixed
- serializeParametersAsArray() : array<string|int, mixed>
- Serialize parameters to be stores into an ini file.
- serializeParametersAsString() : string
- Serialize parameters to be stores into an ini file.
- unserializeParameters() : array<string|int, mixed>
- Unserialize parameters coming from the ini file.
- getInstallAction() : int
- setConfigInfo() : mixed
Constants
CONFIG_SCOPE_APP
the module is configured for any instance.
public
mixed
CONFIG_SCOPE_APP
= 0
CONFIG_SCOPE_LOCAL
the module is configured only at the instance level (installed by the user, not by the developer).
public
mixed
CONFIG_SCOPE_LOCAL
= 1
FILTER_DISABLED_INSTALLED
public
mixed
FILTER_DISABLED_INSTALLED
= 41
FILTER_DISABLED_UNINSTALLED
public
mixed
FILTER_DISABLED_UNINSTALLED
= 37
FILTER_ENABLED_INSTALLED_NOT_UPGRADED
public
mixed
FILTER_ENABLED_INSTALLED_NOT_UPGRADED
= 42
FILTER_ENABLED_INSTALLED_UPGRADED
public
mixed
FILTER_ENABLED_INSTALLED_UPGRADED
= 26
FILTER_ENABLED_UNINSTALLED
public
mixed
FILTER_ENABLED_UNINSTALLED
= 38
FILTER_VAL_DISABLED
public
mixed
FILTER_VAL_DISABLED
= 1
FILTER_VAL_ENABLED
public
mixed
FILTER_VAL_ENABLED
= 2
FILTER_VAL_INSTALLED
public
mixed
FILTER_VAL_INSTALLED
= 8
FILTER_VAL_NOTUPGRADED
public
mixed
FILTER_VAL_NOTUPGRADED
= 32
FILTER_VAL_UNINSTALLED
public
mixed
FILTER_VAL_UNINSTALLED
= 4
FILTER_VAL_UPGRADED
public
mixed
FILTER_VAL_UPGRADED
= 16
Properties
$configurationScope
indicate if the module is configured into the app, or only for the instance, so only into local configuration.
public
int
$configurationScope
= 0
one of CONFIG_SCOPE_* constants
$dbProfile
public
string
$dbProfile
$isEnabled
indicate if the module is enabled into the application or not.
public
bool
$isEnabled
= false
$isInstalled
indicate if the module is marked as installed.
public
bool
$isInstalled
= false
true/false or 0/1
$name
public
string
$name
$parameters
public
array<string|int, string>
$parameters
= array()
parameters for installation
$skipInstaller
public
mixed
$skipInstaller
= false
$version
The version of the module that has been installed.
public
string
$version
$path
protected
mixed
$path
Methods
__construct()
public
__construct(string $name, string $path, array<string|int, mixed> $config, bool $isNativeModule) : mixed
Parameters
- $name : string
-
the name of the module
- $path : string
-
the path to the module
- $config : array<string|int, mixed>
-
configuration of modules ([modules] section), generated by the configuration compiler for a specific entry point
- $isNativeModule : bool
-
true if this is a module installed natively into the application (versus a module installed into an instance of the application)
Return values
mixed —clearInfos()
public
clearInfos(IniModifierInterface $configIni) : mixed
Parameters
- $configIni : IniModifierInterface
Return values
mixed —getName()
public
getName() : mixed
Return values
mixed —getPath()
public
getPath() : mixed
Return values
mixed —getResolverItem()
public
getResolverItem(ModuleInfos $infos, int|array<string|int, int> $filter[, mixed $forConfiguration = false ]) : Item
Parameters
- $infos : ModuleInfos
-
properties of the module
- $filter : int|array<string|int, int>
-
the status that the module should have to be selected
- $forConfiguration : mixed = false
Return values
Item —saveInfos()
public
saveInfos(IniModifierInterface $configIni[, mixed $defaultParameters = array() ]) : mixed
Parameters
- $configIni : IniModifierInterface
- $defaultParameters : mixed = array()
Return values
mixed —serializeParametersAsArray()
Serialize parameters to be stores into an ini file.
public
static serializeParametersAsArray(array<string|int, mixed> $parameters[, array<string|int, mixed> $defaultParameters = array() ]) : array<string|int, mixed>
The result is an array with serialized value.
Parameters
- $parameters : array<string|int, mixed>
- $defaultParameters : array<string|int, mixed> = array()
Return values
array<string|int, mixed> —serializeParametersAsString()
Serialize parameters to be stores into an ini file.
public
static serializeParametersAsString(array<string|int, mixed> $parameters[, array<string|int, mixed> $defaultParameters = array() ]) : string
The result is a single string with fully serialized array as found in Jelix 1.6 or lower.
Parameters
- $parameters : array<string|int, mixed>
- $defaultParameters : array<string|int, mixed> = array()
Return values
string —unserializeParameters()
Unserialize parameters coming from the ini file.
public
static unserializeParameters(array<string|int, mixed>|string $parameters) : array<string|int, mixed>
Parameters could be fully serialized into a single string, or could be as an associative array where only values are serialized
Parameters
- $parameters : array<string|int, mixed>|string
Return values
array<string|int, mixed> —getInstallAction()
protected
getInstallAction(string $newVersion, int|array<string|int, int> $filter) : int
Parameters
- $newVersion : string
-
the new version in case of the item can be upgraded
- $filter : int|array<string|int, int>
-
one of FILTER_* const
Tags
Return values
int —setConfigInfo()
private
setConfigInfo(IniModifierInterface $configIni, string $name, mixed $value, mixed $defaultValue) : mixed
Parameters
- $configIni : IniModifierInterface
- $name : string
- $value : mixed
- $defaultValue : mixed