class CRM_Extension_Info

Metadata for an extension (e.g. the extension's "info.xml" file)

Constants

FILENAME

Extension info file name.

Properties

string $key
$type
$name
$label
$file
array $classloader
array $requires

Methods

loadFromFile($file)

Load extension info an XML file.

loadFromString(string $string)

Load extension info a string.

static array
buildReverseMap(array $infos)

Build a reverse-dependency map.

__construct(null $key = NULL, null $type = NULL, null $name = NULL, null $label = NULL, null $file = NULL)

No description

parse(SimpleXMLElement $info)

Copy attributes from an XML document to $this

array
filterRequirements(SimpleXMLElement $requirements)

Filter out invalid requirements, e.g. extensions that have been moved to core.

Details

at line 71
static CRM_Extension_Info loadFromFile($file)

Load extension info an XML file.

Parameters

$file

Return Value

CRM_Extension_Info

Exceptions

CRM_Extension_Exception_ParseException

at line 91
static CRM_Extension_Info loadFromString(string $string)

Load extension info a string.

Parameters

string $string XML content.

Return Value

CRM_Extension_Info

Exceptions

CRM_Extension_Exception_ParseException

at line 113
static array buildReverseMap(array $infos)

Build a reverse-dependency map.

Parameters

array $infos The universe of available extensions. Ex: $infos['org.civicrm.foobar'] = new CRM_Extension_Info().

Return Value

array If "org.civicrm.api" is required by "org.civicrm.foo", then return array('org.civicrm.api' => array(CRM_Extension_Info[org.civicrm.foo])). Array(string $key => array $requiredBys).

at line 130
__construct(null $key = NULL, null $type = NULL, null $name = NULL, null $label = NULL, null $file = NULL)

Parameters

null $key
null $type
null $name
null $label
null $file

at line 143
parse(SimpleXMLElement $info)

Copy attributes from an XML document to $this

Parameters

SimpleXMLElement $info

at line 189
array filterRequirements(SimpleXMLElement $requirements)

Filter out invalid requirements, e.g. extensions that have been moved to core.

Parameters

SimpleXMLElement $requirements

Return Value

array