Elgg  Version 2.2
 All Classes Namespaces Files Functions Variables Pages
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 18 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 151 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 700 of file ElggPluginManifest.php.

ElggPluginManifest::getActivateOnInstall ( )

Should this plugin be activated when Elgg is installed.

Returns
bool

Definition at line 674 of file ElggPluginManifest.php.

ElggPluginManifest::getApiVersion ( )

Returns the API version in use.

Returns
int

Definition at line 217 of file ElggPluginManifest.php.

ElggPluginManifest::getAuthor ( )

Returns the plugin author.

Returns
string

Definition at line 356 of file ElggPluginManifest.php.

ElggPluginManifest::getBlurb ( )

Return the short description.

Returns
string

Definition at line 290 of file ElggPluginManifest.php.

ElggPluginManifest::getBugTrackerURL ( )

Returns the bug tracker page.

Returns
string

Definition at line 329 of file ElggPluginManifest.php.

ElggPluginManifest::getCategories ( )

Return the categories listed for this plugin.

Returns
array

Definition at line 383 of file ElggPluginManifest.php.

ElggPluginManifest::getConflicts ( )

Returns the conflicts listed.

Returns
array

Definition at line 648 of file ElggPluginManifest.php.

ElggPluginManifest::getContributors ( )

Return the contributors listed.

Returns
array

Definition at line 460 of file ElggPluginManifest.php.

ElggPluginManifest::getCopyright ( )

Return the copyright.

Returns
string

Definition at line 365 of file ElggPluginManifest.php.

ElggPluginManifest::getDescription ( )

Return the description.

Returns
string

Definition at line 281 of file ElggPluginManifest.php.

ElggPluginManifest::getDonationsPageURL ( )

Returns the donations page.

Returns
string

Definition at line 338 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 719 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 271 of file ElggPluginManifest.php.

ElggPluginManifest::getLicense ( )

Returns the license.

Returns
string

Definition at line 305 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 242 of file ElggPluginManifest.php.

ElggPluginManifest::getName ( )

Returns the plugin name.

Returns
string

Definition at line 255 of file ElggPluginManifest.php.

ElggPluginManifest::getPluginID ( )

Returns the plugin ID.

Returns
string

Definition at line 226 of file ElggPluginManifest.php.

ElggPluginManifest::getProvides ( )

Return the list of provides by this plugin.

Returns
array

Definition at line 480 of file ElggPluginManifest.php.

ElggPluginManifest::getRepositoryURL ( )

Returns the repository url.

Returns
string

Definition at line 320 of file ElggPluginManifest.php.

ElggPluginManifest::getRequires ( )

Returns the dependencies listed.

Returns
array

Definition at line 514 of file ElggPluginManifest.php.

ElggPluginManifest::getScreenshots ( )

Return the screenshots listed.

Returns
array

Definition at line 440 of file ElggPluginManifest.php.

ElggPluginManifest::getSuggests ( )

Returns the suggests elements.

Returns
array

Definition at line 534 of file ElggPluginManifest.php.

ElggPluginManifest::getVersion ( )

Returns the version of the plugin.

Returns
float

Definition at line 347 of file ElggPluginManifest.php.

ElggPluginManifest::getWebsite ( )

Return the website.

Returns
string

Definition at line 374 of file ElggPluginManifest.php.

Member Data Documentation

ElggPluginManifest::$apiVersion
protected

Definition at line 133 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 31 of file ElggPluginManifest.php.

ElggPluginManifest::$parser
protected

Definition at line 25 of file ElggPluginManifest.php.

ElggPluginManifest::$pluginID
protected

Definition at line 140 of file ElggPluginManifest.php.


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