$classVersions
$classVersions :
A factory that builds instances of other classes from this library.
When multiple versions of the same class have been loaded (e.g. PluginUpdateChecker 1.2 and 1.3), this factory will always use the latest available version. Register class versions by calling KernlFactory::addVersion().
At the moment it can only build instances of the PluginUpdateChecker class. Other classes
are intended mainly for internal use and refer directly to specific implementations. If you
want to instantiate one of them anyway, you can use KernlFactory::getLatestClassVersion()
to get the class name and then create it with new $class(...)
.
buildUpdateChecker( $metadataUrl, $pluginFile, string $slug = '', integer $checkPeriod = 12, string $optionName = '', string $muPluginFile = '') : \PluginUpdateChecker
Create a new instance of PluginUpdateChecker.
$metadataUrl | ||
$pluginFile | ||
string | $slug | |
integer | $checkPeriod | |
string | $optionName | |
string | $muPluginFile |
addVersion(string $generalClass, string $versionedClass, string $version)
Register a version of a class.
string | $generalClass | Class name without version numbers, e.g. 'PluginUpdateChecker'. |
string | $versionedClass | Actual class name, e.g. 'PluginUpdateChecker_1_2'. |
string | $version | Version number, e.g. '1.2'. |