Core
    
            
            in package
            
        
    
    
            
            Uses
                            UtilsProvider,                             Core                    
    
Base class for the applications Core class.
Table of Contents
Properties
- $activator : Activator
- The plugins activator class.
- $assets : Assets
- The plugins asset class.
- $plugin_data : mixed
- The stored plugin data.
- $service : Service
- The utils service class.
Methods
- getActivator() : Activator
- Getter.
- getAssets() : Assets
- Getter
- getInternalPackages() : object
- Get a list of internal packages (our own, symlinked from the monorepo).
- getPluginConstantPrefix() : string
- Get the prefix of this plugin so composer packages can dynamically build other constant values on it.
- getPluginData() : array<string|int, string>|string|null
- Gets the plugin data.
- getService() : Service
- Getter
- i18n() : mixed
- The plugin is loaded. Start to register the localization (i18n) files.
- updateDbCheck() : mixed
- Updates the database version in the options table.
- versionCompareOlderThan() : mixed
- Checks if a previously installed version is lower than an expected version.
- __construct() : mixed
- The constructor handles the core startup mechanism.
- construct() : mixed
- The constructor handles the core startup mechanism.
Properties
$activator
The plugins activator class.
    private
        Activator
    $activator
    
    
    
    
$assets
The plugins asset class.
    private
        Assets
    $assets
    
    
    
    
$plugin_data
The stored plugin data.
    private
        mixed
    $plugin_data
    
    
    
    
$service
The utils service class.
    private
        Service
    $service
    
    
    
    
Methods
getActivator()
Getter.
    public
                    getActivator() : Activator
    Tags
Return values
ActivatorgetAssets()
Getter
    public
                    getAssets() : Assets
    Tags
Return values
AssetsgetInternalPackages()
Get a list of internal packages (our own, symlinked from the monorepo).
    public
                    getInternalPackages() : object
    Return values
objectgetPluginConstantPrefix()
Get the prefix of this plugin so composer packages can dynamically build other constant values on it.
    public
                    getPluginConstantPrefix() : string
    Tags
Return values
stringgetPluginData()
Gets the plugin data.
    public
                    getPluginData([string $key = null ]) : array<string|int, string>|string|null
    Parameters
- $key : string = null
- 
                    The key of the data to return 
Tags
Return values
array<string|int, string>|string|nullgetService()
Getter
    public
                    getService() : Service
    Tags
Return values
Servicei18n()
The plugin is loaded. Start to register the localization (i18n) files.
    public
                    i18n() : mixed
    Also respect packages in vendor dir.
updateDbCheck()
Updates the database version in the options table.
    public
                    updateDbCheck() : mixed
    It also installs the needed database tables.
versionCompareOlderThan()
Checks if a previously installed version is lower than an expected version.
    public
            static        versionCompareOlderThan(string|false $installed, string $version[, array<string|int, string> $allowedPrerelease = [] ][, callable $prereleaseAdditionalCheck = null ]) : mixed
    Additionally, we can check for a prerelease version, too. The $allowedPrerelease needs
to be an array (e.g. ["2.15.1", "2.16.0"]), and if the installed version is a prerelease
(e.g. 2.15.1-9507), the version 2.15.1 gets extracted and checked for existence in the array.
Usage with $prereleaseAdditionalCheck: You can pass an additional callback which is executed before
returning true when a prerelease got found. An example scenario for this callable is to check for
a specific database table if you drop a column. Why is this needed? Imagine you are sending multiple
prerelease to a customer.
Parameters
- $installed : string|false
- $version : string
- $allowedPrerelease : array<string|int, string> = []
- $prereleaseAdditionalCheck : callable = null
- 
                    ($prereleaseVersion, $prereleaseCiIid) => boolean
__construct()
The constructor handles the core startup mechanism.
    protected
                    __construct() : mixed
    The constructor is protected because a factory method should only create a Core object.
Tags
construct()
The constructor handles the core startup mechanism.
    protected
                    construct() : mixed
    The constructor is protected because a factory method should only create a Core object.