class ModuleValidator

Class ModuleValidartor

Methods

__construct( string $modulePath = null, Translator $translator = null)

No description

setModulePath( mixed $modulePath)

No description

mixed
getModulePath()

No description

getModuleDefinition()

No description

mixed
getModuleVersion()

No description

array
getErrors()

No description

getTranslator()

No description

validate( bool $checkCurrentVersion = true)

Validate a module, checks :

loadModuleDefinition()

No description

array
getModulesDependOf( bool|null $active = true)

Get an array of modules that depend of the current module

getCurrentModuleDependencies()

No description

Details

at line 57
__construct( string $modulePath = null, Translator $translator = null)

Parameters

string $modulePath the path of the module directory
Translator $translator FOR UNIT TEST PURPOSE ONLY

at line 75
setModulePath( mixed $modulePath)

Parameters

mixed $modulePath

at line 83
mixed getModulePath()

Return Value

mixed

at line 91
ModuleDescriptorValidator|null getModuleDescriptor()

Return Value

ModuleDescriptorValidator|null

at line 99
ModuleDefinition|null getModuleDefinition()

Return Value

ModuleDefinition|null

at line 107
mixed getModuleVersion()

Return Value

mixed

at line 116
array getErrors()

Return Value

array

at line 124
Translator getTranslator()

Return Value

Translator

at line 142
validate( bool $checkCurrentVersion = true)

Validate a module, checks :

  • version of Thelia
  • modules dependencies

Parameters

bool $checkCurrentVersion if true it will also check if the module is already installed (not activated - present in module list)

at line 209
loadModuleDefinition()

at line 347
array getModulesDependOf( bool|null $active = true)

Get an array of modules that depend of the current module

Parameters

bool|null $active if true only search in activated module, false only deactivated and null on all modules

Return Value

array array of array with code which is the module code that depends of this current module and version which is the required version of current module

at line 389
getCurrentModuleDependencies()