ExtensionConfig

Thin wrapper class around extension config.xml file.

package

Default

Methods

__construct

__construct(\SimpleXMLElement $xml)

Arguments

$xml

\SimpleXMLElement

Create a version fetcher for every <updater> tag in config.xml.

createVersionFetchers(): array

Response

array

VersionFetcher[]

findConfigXml

findConfigXml(\ZipArchive $zip): string|null
static

Arguments

$zip

\ZipArchive

Response

string|null

getAuthor

getAuthor(): string

Response

string

getDescription

getDescription(): string

Response

string

getLicense

getLicense(): string

Response

string

getName

getName(): string

Response

string

Returns the $nodeName XML node as an array

getNodeAsArray(string $nodeName): \array<mixed>

Arguments

$nodeName

string

the name of the node to retrieve

Response

\array

the node contents as an array

Version is a string, not number, due to semantic versioning.

getVersion(): string

Response

string

Returns true if this extension config is compatible with this version of LS.

isCompatible(): boolean

Response

boolean

loadFromFile

loadFromFile(string $file): \ExtensionConfig
static

Arguments

$file

string

Full file path.

Response

\ExtensionConfig

Create an ExtensionConfig from config.xml inside zip $filePath config.xml can be in a subfolder.

loadFromZip(string $filePath): \ExtensionConfig
static
Throws
\Exception

at error

Arguments

$filePath

string

Full file path.

Response

\ExtensionConfig

Check basic properties of the config.xml.

validate(): boolean
todo

Get detailed error message.

Response

boolean

Properties

xml

xml :\SimpleXMLElement
var

Type(s)

\SimpleXMLElement