PHP Class ElggPluginManifest, Elgg

Normalizes the values from the \ElggManifestParser object. This requires an \ElggPluginManifestParser class implementation as $this->parser. To add new parser versions, name them \ElggPluginManifestParserXX where XX is the version specified in the top-level tag's XML namespace.
Since: 1.8
Afficher le fichier Open project: elgg/elgg Class Usage Examples

Protected Properties

Свойство Type Description
$apiVersion integer The API version of the manifest.
$namespace_root This is in the format http://www.elgg.org/plugin_manifest/
$parser ElggPluginManifestParser18 The parser object
$pluginID string The optional plugin id this manifest belongs to.

Méthodes publiques

Méthode Description
__construct ( mixed $manifest, string $plugin_id = null ) Load a manifest file, XmlElement or path to manifest.xml file
getActivateOnInstall ( ) : boolean Should this plugin be activated when Elgg is installed
getApiVersion ( ) : integer Returns the API version in use.
getAuthor ( ) : string Returns the plugin author.
getBlurb ( ) : string Return the short description
getBugTrackerURL ( ) : string Returns the bug tracker page
getCategories ( ) : array Return the categories listed for this plugin
getConflicts ( ) : array Returns the conflicts listed
getContributors ( ) : array Return the contributors listed.
getCopyright ( ) : string Return the copyright
getDescription ( ) : string Return the description
getDonationsPageURL ( ) : string Returns the donations page
getFriendlyCategory ( string $category ) : string Returns a category's friendly name. This can be localized by defining the string 'admin:plugins:category:'. If no localization is found, returns the category with _ and - converted to ' ' and then ucwords()'d.
getID ( ) : string Return the plugin ID required by the author. If getPluginID() does not match this, the plugin should not be started.
getLicense ( ) : string Returns the license
getManifest ( ) : array Returns the manifest array.
getName ( ) : string Returns the plugin name
getPluginID ( ) : string Returns the plugin ID.
getProvides ( ) : array Return the list of provides by this plugin.
getRepositoryURL ( ) : string Returns the repository url
getRequires ( ) : array Returns the dependencies listed.
getScreenshots ( ) : array Return the screenshots listed.
getSuggests ( ) : array Returns the suggests elements.
getVersion ( ) : float Returns the version of the plugin.
getWebsite ( ) : string Return the website

Méthodes protégées

Méthode Description
buildStruct ( array $struct, array $array ) : array Normalizes an array into the structure specified

Private Methods

Méthode Description
normalizeDep ( array $dep ) : array Normalizes a dependency array using the defined structs.

Method Details

__construct() public méthode

Load a manifest file, XmlElement or path to manifest.xml file
public __construct ( mixed $manifest, string $plugin_id = null )
$manifest mixed A string, XmlElement, or path of a manifest file.
$plugin_id string Optional ID of the owning plugin. Used to fill in some values automatically.

buildStruct() protected méthode

Normalizes an array into the structure specified
protected buildStruct ( array $struct, array $array ) : array
$struct array The struct to normalize $element to.
$array array The array
Résultat array

getActivateOnInstall() public méthode

@return bool
public getActivateOnInstall ( ) : boolean
Résultat boolean

getApiVersion() public méthode

Returns the API version in use.
public getApiVersion ( ) : integer
Résultat integer

getAuthor() public méthode

Returns the plugin author.
public getAuthor ( ) : string
Résultat string

getBlurb() public méthode

Return the short description
public getBlurb ( ) : string
Résultat string

getBugTrackerURL() public méthode

Returns the bug tracker page
public getBugTrackerURL ( ) : string
Résultat string

getCategories() public méthode

Return the categories listed for this plugin
public getCategories ( ) : array
Résultat array

getConflicts() public méthode

Returns the conflicts listed
public getConflicts ( ) : array
Résultat array

getContributors() public méthode

Return the contributors listed.
public getContributors ( ) : array
Résultat array

getCopyright() public méthode

Return the copyright
public getCopyright ( ) : string
Résultat string

getDescription() public méthode

Return the description
public getDescription ( ) : string
Résultat string

getDonationsPageURL() public méthode

Returns the donations page
public getDonationsPageURL ( ) : string
Résultat string

getFriendlyCategory() public static méthode

Returns a category's friendly name. This can be localized by defining the string 'admin:plugins:category:'. If no localization is found, returns the category with _ and - converted to ' ' and then ucwords()'d.
public static getFriendlyCategory ( string $category ) : string
$category string The category as defined in the manifest.
Résultat string A human-readable category

getID() public méthode

Return the plugin ID required by the author. If getPluginID() does not match this, the plugin should not be started.
public getID ( ) : string
Résultat string empty string if not empty/not defined

getLicense() public méthode

Returns the license
public getLicense ( ) : string
Résultat string

getManifest() public méthode

Used for backward compatibility. Specific methods should be called instead.
public getManifest ( ) : array
Résultat array

getName() public méthode

Returns the plugin name
public getName ( ) : string
Résultat string

getPluginID() public méthode

Returns the plugin ID.
public getPluginID ( ) : string
Résultat string

getProvides() public méthode

Return the list of provides by this plugin.
public getProvides ( ) : array
Résultat array

getRepositoryURL() public méthode

Returns the repository url
public getRepositoryURL ( ) : string
Résultat string

getRequires() public méthode

Returns the dependencies listed.
public getRequires ( ) : array
Résultat array

getScreenshots() public méthode

Return the screenshots listed.
public getScreenshots ( ) : array
Résultat array

getSuggests() public méthode

Returns the suggests elements.
public getSuggests ( ) : array
Résultat array

getVersion() public méthode

Returns the version of the plugin.
public getVersion ( ) : float
Résultat float

getWebsite() public méthode

Return the website
public getWebsite ( ) : string
Résultat string

Property Details

$apiVersion protected_oe property

The API version of the manifest.
protected int $apiVersion
Résultat integer

$namespace_root protected_oe property

This is in the format http://www.elgg.org/plugin_manifest/
protected $namespace_root

$parser protected_oe property

The parser object
protected ElggPluginManifestParser18 $parser
Résultat ElggPluginManifestParser18

$pluginID protected_oe property

The optional plugin id this manifest belongs to.
protected string $pluginID
Résultat string