Метод | Описание | |
---|---|---|
__construct ( string $subdir = '' ) | Addon constructor. | |
__set_state ( array $array ) : |
Support {@link var_export()} for caching. | |
check ( boolean $trigger = false ) : array | Check the addon for data issues. | |
checkVersion ( string $version, string $requirement ) | Check a version against a version requirement. | |
comparePriority ( |
Compare two addon's by priority so that they can be sorted. | |
getClassPath ( string $classname, string $relative = self::PATH_FULL ) : string | Get the path of a class within this addon. | |
getClasses ( ) : array | Get the classes. | |
getIcon ( string $relative = self::PATH_ADDON ) : string | Get the path to the icon for this addon. | |
getInfo ( ) : array | Get the info. | |
getInfoValue ( string $key, mixed $default = null ) : mixed | Get a single value from the info array. | |
getKey ( ) : string | Get this addon's key. | |
getName ( ) : string | Get this addon's human-readable name. | |
getPluginClass ( ) : string | Get the name of the plugin class for this addon, if any. | |
getPriority ( ) : integer | Get the priority of this addon. | |
getRawKey ( ) : string | Get this addon's raw case-sensitive key. | |
getRequirements ( ) : array | Get the required addons for this addon. | |
getSpecial ( string $key, mixed $default = null ) : mixed | Get an item from the special array. | |
getSubdir ( ) : string | Get the subdir. | |
getTranslationPaths ( string $locale = '' ) : array | Get translation paths. | |
getType ( ) : string | Get the type of addon. | |
getVersion ( ) : string | Get the version number of the addon. | |
makeFilterCallback ( array $where ) : Closure | Return a function that can be used as a callback to filter arrays of {@link Addon} objects. | |
path ( string $subpath = '', string $relative = self::PATH_FULL ) : string | Make a full path from an addon-relative path. | |
scan ( string $subdir ) | Scan a subdirectory and setup this addon. | |
test ( boolean $throw = true ) : boolean | Do a very basic test of this addon. |
Метод | Описание | |
---|---|---|
canonicalizeLocale ( string $locale ) : string | Canonicalize a locale string so different representations of the same locale can be used together. | |
convertRequire ( array $info, array $keys ) | Convert the info array style requirements to the composer-like require format. | |
glob ( string $pattern ) : array | Perform a glob from this addon's subdirectory. | |
scanClassPaths ( ) | ||
scanClasses ( ) : array | Scan for all of the classes in this addon. | |
scanFile ( string $path ) : array | Looks what classes and namespaces are defined in a file and returns them. | |
scanInfo ( ) : array | null | Get an addon's meta info. | |
scanInfoArray ( string $subpath ) : array | null | Scan an addon's info array. | |
scanTranslations ( ) | Scan the addon for translation files. | |
setClasses ( array $classes ) : |
Set the classes. | |
setInfo ( array $info ) : |
Set the info. | |
setSpecialArray ( array $special ) : |
Set the special array. | |
setSubdir ( string $subdir ) : |
Set the root-relative subdirectory of the addon. | |
setTranslationPaths ( array $translations ) : |
Set the translation paths. | |
splitAuthors ( array $author ) : array[array[string]] | Split an author array that may contain multiple authors separated by commas. | |
splitRequirement ( string $requirement ) : array | Split a requirements string into comparisons. | |
testRequirement ( string $version, array $req ) : boolean | Test an individual requirement. |
public __construct ( string $subdir = '' ) | ||
$subdir | string | The root-relative subdirectory of the addon. |
public static __set_state ( array $array ) : |
||
$array | array | The array to load. |
Результат | Returns a new addon with the properties from {@link $array}. |
public static checkVersion ( string $version, string $requirement ) | ||
$version | string | The version to check. |
$requirement | string | The version requirement. |
public static comparePriority ( |
||
$a | The first addon to compare. | |
$b | The second addon to compare. | |
Результат | integer | Returns -1, 0, or 1. |
public getClasses ( ) : array | ||
Результат | array | Returns the classes. |
public getPluginClass ( ) : string | ||
Результат | string | Returns the name of the class or an empty string if it doesn't have one. |
public getPriority ( ) : integer | ||
Результат | integer | Returns the priority. |
public getRequirements ( ) : array | ||
Результат | array | Returns an array in the form addonKey => version. |
public getTranslationPaths ( string $locale = '' ) : array | ||
$locale | string | If passed then only the translation paths for this locale will be returned. |
Результат | array | Returns an array of translation paths or an array of locale codes pointing to translation paths. |
public getVersion ( ) : string | ||
Результат | string | Returns a version number or an empty string if there isn't one. |
public static makeFilterCallback ( array $where ) : Closure | ||
$where | array | A where array that filters the info array. |
Результат | Closure | Returns a new closure. |