PHP 클래스 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.
부터: 1.8
파일 보기 프로젝트 열기: elgg/elgg 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$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.

공개 메소드들

메소드 설명
__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

보호된 메소드들

메소드 설명
buildStruct ( array $struct, array $array ) : array Normalizes an array into the structure specified

비공개 메소드들

메소드 설명
normalizeDep ( array $dep ) : array Normalizes a dependency array using the defined structs.

메소드 상세

__construct() 공개 메소드

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() 보호된 메소드

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
리턴 array

getActivateOnInstall() 공개 메소드

@return bool
public getActivateOnInstall ( ) : boolean
리턴 boolean

getApiVersion() 공개 메소드

Returns the API version in use.
public getApiVersion ( ) : integer
리턴 integer

getAuthor() 공개 메소드

Returns the plugin author.
public getAuthor ( ) : string
리턴 string

getBlurb() 공개 메소드

Return the short description
public getBlurb ( ) : string
리턴 string

getBugTrackerURL() 공개 메소드

Returns the bug tracker page
public getBugTrackerURL ( ) : string
리턴 string

getCategories() 공개 메소드

Return the categories listed for this plugin
public getCategories ( ) : array
리턴 array

getConflicts() 공개 메소드

Returns the conflicts listed
public getConflicts ( ) : array
리턴 array

getContributors() 공개 메소드

Return the contributors listed.
public getContributors ( ) : array
리턴 array

getCopyright() 공개 메소드

Return the copyright
public getCopyright ( ) : string
리턴 string

getDescription() 공개 메소드

Return the description
public getDescription ( ) : string
리턴 string

getDonationsPageURL() 공개 메소드

Returns the donations page
public getDonationsPageURL ( ) : string
리턴 string

getFriendlyCategory() 공개 정적인 메소드

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.
리턴 string A human-readable category

getID() 공개 메소드

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

getLicense() 공개 메소드

Returns the license
public getLicense ( ) : string
리턴 string

getManifest() 공개 메소드

Used for backward compatibility. Specific methods should be called instead.
public getManifest ( ) : array
리턴 array

getName() 공개 메소드

Returns the plugin name
public getName ( ) : string
리턴 string

getPluginID() 공개 메소드

Returns the plugin ID.
public getPluginID ( ) : string
리턴 string

getProvides() 공개 메소드

Return the list of provides by this plugin.
public getProvides ( ) : array
리턴 array

getRepositoryURL() 공개 메소드

Returns the repository url
public getRepositoryURL ( ) : string
리턴 string

getRequires() 공개 메소드

Returns the dependencies listed.
public getRequires ( ) : array
리턴 array

getScreenshots() 공개 메소드

Return the screenshots listed.
public getScreenshots ( ) : array
리턴 array

getSuggests() 공개 메소드

Returns the suggests elements.
public getSuggests ( ) : array
리턴 array

getVersion() 공개 메소드

Returns the version of the plugin.
public getVersion ( ) : float
리턴 float

getWebsite() 공개 메소드

Return the website
public getWebsite ( ) : string
리턴 string

프로퍼티 상세

$apiVersion 보호되어 있는 프로퍼티

The API version of the manifest.
protected int $apiVersion
리턴 integer

$namespace_root 보호되어 있는 프로퍼티

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

$parser 보호되어 있는 프로퍼티

The parser object
protected ElggPluginManifestParser18 $parser
리턴 ElggPluginManifestParser18

$pluginID 보호되어 있는 프로퍼티

The optional plugin id this manifest belongs to.
protected string $pluginID
리턴 string