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(...)
.
Afficher le fichier
Open project: r-a-y/bp-reply-by-email
Class Usage Examples
Protected Properties
Méthodes publiques
Méthodes protégées
Method Details
addVersion()
public static méthode
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 méthode
Create a new instance of PluginUpdateChecker.
compareVersions()
protected static méthode
getLatestClassVersion()
public static méthode
Get the specific class name for the latest available version of a class.
sortVersions()
protected static méthode
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