Elgg  Version 3.0
Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
ElggPluginManifest Class Reference

Public Member Functions

 __construct ($manifest, $plugin_id=null)
 Load a manifest file, XmlElement or path to manifest.xml file. More...
 
 getApiVersion ()
 Returns the API version in use. More...
 
 getPluginID ()
 Returns the plugin ID. More...
 
 getManifest ()
 Returns the manifest array. More...
 
 getName ()
 Returns the plugin name. More...
 
 getID ()
 Return the plugin ID required by the author. More...
 
 getDescription ()
 Return the description. More...
 
 getBlurb ()
 Return the short description. More...
 
 getLicense ()
 Returns the license. More...
 
 getRepositoryURL ()
 Returns the repository url. More...
 
 getBugTrackerURL ()
 Returns the bug tracker page. More...
 
 getDonationsPageURL ()
 Returns the donations page. More...
 
 getVersion ()
 Returns the version of the plugin. More...
 
 getAuthor ()
 Returns the plugin author. More...
 
 getCopyright ()
 Return the copyright. More...
 
 getWebsite ()
 Return the website. More...
 
 getCategories ()
 Return the categories listed for this plugin. More...
 
 getScreenshots ()
 Return the screenshots listed. More...
 
 getContributors ()
 Return the contributors listed. More...
 
 getProvides ()
 Return the list of provides by this plugin. More...
 
 getRequires ()
 Returns the dependencies listed. More...
 
 getSuggests ()
 Returns the suggests elements. More...
 
 getConflicts ()
 Returns the conflicts listed. More...
 
 getActivateOnInstall ()
 Should this plugin be activated when Elgg is installed. More...
 

Static Public Member Functions

static getFriendlyCategory ($category)
 Returns a category's friendly name. More...
 

Protected Member Functions

 buildStruct (array $struct, array $array)
 Normalizes an array into the structure specified. More...
 

Protected Attributes

 $parser
 
 $namespace_root = 'http://www.elgg.org/plugin_manifest/'
 The root for plugin manifest namespaces. More...
 
 $apiVersion
 
 $pluginID
 

Detailed Description

Definition at line 19 of file ElggPluginManifest.php.

Constructor & Destructor Documentation

ElggPluginManifest::__construct (   $manifest,
  $plugin_id = null 
)

Load a manifest file, XmlElement or path to manifest.xml file.

Parameters
mixed$manifestA string, XmlElement, or path of a manifest file.
string$plugin_idOptional ID of the owning plugin. Used to fill in some values automatically.
Exceptions
PluginException

Definition at line 152 of file ElggPluginManifest.php.

Member Function Documentation

ElggPluginManifest::buildStruct ( array  $struct,
array  $array 
)
protected

Normalizes an array into the structure specified.

Parameters
array$structThe struct to normalize $element to.
array$arrayThe array
Returns
array

Definition at line 698 of file ElggPluginManifest.php.

ElggPluginManifest::getActivateOnInstall ( )

Should this plugin be activated when Elgg is installed.

Returns
bool

Definition at line 672 of file ElggPluginManifest.php.

ElggPluginManifest::getApiVersion ( )

Returns the API version in use.

Returns
string

Definition at line 218 of file ElggPluginManifest.php.

ElggPluginManifest::getAuthor ( )

Returns the plugin author.

Returns
string

Definition at line 354 of file ElggPluginManifest.php.

ElggPluginManifest::getBlurb ( )

Return the short description.

Returns
string

Definition at line 291 of file ElggPluginManifest.php.

ElggPluginManifest::getBugTrackerURL ( )

Returns the bug tracker page.

Returns
string

Definition at line 327 of file ElggPluginManifest.php.

ElggPluginManifest::getCategories ( )

Return the categories listed for this plugin.

Returns
array

Definition at line 381 of file ElggPluginManifest.php.

ElggPluginManifest::getConflicts ( )

Returns the conflicts listed.

Returns
array

Definition at line 646 of file ElggPluginManifest.php.

ElggPluginManifest::getContributors ( )

Return the contributors listed.

Returns
array

Definition at line 456 of file ElggPluginManifest.php.

ElggPluginManifest::getCopyright ( )

Return the copyright.

Returns
string

Definition at line 363 of file ElggPluginManifest.php.

ElggPluginManifest::getDescription ( )

Return the description.

Returns
string

Definition at line 282 of file ElggPluginManifest.php.

ElggPluginManifest::getDonationsPageURL ( )

Returns the donations page.

Returns
string

Definition at line 336 of file ElggPluginManifest.php.

static ElggPluginManifest::getFriendlyCategory (   $category)
static

Returns a category's friendly name.

This can be localized by defining the string 'admin:plugins:category:<category>'. If no localization is found, returns the category with _ and - converted to ' ' and then ucwords()'d.

Parameters
string$categoryThe category as defined in the manifest.
Returns
string A human-readable category

Definition at line 717 of file ElggPluginManifest.php.

ElggPluginManifest::getID ( )

Return the plugin ID required by the author.

If getPluginID() does not match this, the plugin should not be started.

Returns
string empty string if not empty/not defined

Definition at line 272 of file ElggPluginManifest.php.

ElggPluginManifest::getLicense ( )

Returns the license.

Returns
string

Definition at line 306 of file ElggPluginManifest.php.

ElggPluginManifest::getManifest ( )

Returns the manifest array.

Used for backward compatibility. Specific methods should be called instead.

Returns
array

Definition at line 243 of file ElggPluginManifest.php.

ElggPluginManifest::getName ( )

Returns the plugin name.

Returns
string

Definition at line 256 of file ElggPluginManifest.php.

ElggPluginManifest::getPluginID ( )

Returns the plugin ID.

Returns
string

Definition at line 227 of file ElggPluginManifest.php.

ElggPluginManifest::getProvides ( )

Return the list of provides by this plugin.

Returns
array

Definition at line 476 of file ElggPluginManifest.php.

ElggPluginManifest::getRepositoryURL ( )

Returns the repository url.

Returns
string

Definition at line 318 of file ElggPluginManifest.php.

ElggPluginManifest::getRequires ( )

Returns the dependencies listed.

Returns
array

Definition at line 510 of file ElggPluginManifest.php.

ElggPluginManifest::getScreenshots ( )

Return the screenshots listed.

Returns
array

Definition at line 436 of file ElggPluginManifest.php.

ElggPluginManifest::getSuggests ( )

Returns the suggests elements.

Returns
array

Definition at line 530 of file ElggPluginManifest.php.

ElggPluginManifest::getVersion ( )

Returns the version of the plugin.

Returns
mixed

Definition at line 345 of file ElggPluginManifest.php.

ElggPluginManifest::getWebsite ( )

Return the website.

Returns
string

Definition at line 372 of file ElggPluginManifest.php.

Member Data Documentation

ElggPluginManifest::$apiVersion
protected

Definition at line 134 of file ElggPluginManifest.php.

ElggPluginManifest::$namespace_root = 'http://www.elgg.org/plugin_manifest/'
protected

The root for plugin manifest namespaces.

This is in the format http://www.elgg.org/plugin_manifest/<version>

Definition at line 32 of file ElggPluginManifest.php.

ElggPluginManifest::$parser
protected

Definition at line 26 of file ElggPluginManifest.php.

ElggPluginManifest::$pluginID
protected

Definition at line 141 of file ElggPluginManifest.php.


The documentation for this class was generated from the following file: