PHP Class PucFactory, bp-reply-by-email
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 {@link PucFactory::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 {@link PucFactory::getLatestClassVersion()}
to get the class name and then create it with
new $class(...)
.
Mostrar archivo
Open project: r-a-y/bp-reply-by-email
Class Usage Examples
Protected Properties
Public Methods
Protected Methods
Method Details
addVersion()
public static method
Register a version of a class.
public static addVersion ( string $generalClass, string $versionedClass, string $version ) |
$generalClass |
string |
Class name without version numbers, e.g. 'PluginUpdateChecker'. |
$versionedClass |
string |
Actual class name, e.g. 'PluginUpdateChecker_1_2'. |
$version |
string |
Version number, e.g. '1.2'. |
buildUpdateChecker()
public static method
Create a new instance of PluginUpdateChecker.
compareVersions()
protected static method
getLatestClassVersion()
public static method
Get the specific class name for the latest available version of a class.
sortVersions()
protected static method
Sort available class versions in descending order (i.e. newest first).
Property Details
$classVersions protected_oe static_oe property
protected static $classVersions |
$sorted protected_oe static_oe property