ExtensionXmlParser

class \TYPO3\CMS\Extensionmanager\Parser\ExtensionXmlParser

Implements
SplSubject

Parser for TYPO3's extension.xml file.

Depends on PHP ext/xml which is a required composer php extension and enabled in PHP by default since a long time.

Table of Contents

Interfaces

SplSubject

Properties

$artifactSha256  : string
$authorcompany  : string
Parsed property data
$authoremail  : string
$authorname  : string
$category  : string
$composerName  : string
$dependencies  : string
$description  : string
$distributionImage  : string
$distributionWelcomeImage  : string
$documentationLink  : string
$elementData  : string
Keeps current data of element to process.
$extensionDownloadCounter  : int
$extensionKey  : string
$lastuploaddate  : int
$observers  : SplObserver[]
Keeps list of attached observers.
$ownerusername  : string
$reviewstate  : int
$state  : string
$t3xfilemd5  : string
$title  : string
$uploadcomment  : string
$version  : string
$versionDownloadCounter  : int

Methods

__construct()  : mixed
attach()  : void
Method attaches an observer.
detach()  : void
Method detaches an attached observer
getAlldownloadcounter()  : int
Returns download number sum of all extension's versions.
getArtifactSha256()  : string
Returns the SHA-256 hash of the zip artifact of an extension's version.
getAuthorcompany()  : string
Returns company name of extension author.
getAuthoremail()  : string
Returns e-mail address of extension author.
getAuthorname()  : string
Returns name of extension author.
getCategory()  : string
Returns category of an extension.
getComposerName()  : string
Returns the composer package name of an extension's version.
getDependencies()  : string
Returns dependencies of an extension's version as a serialized string
getDescription()  : string
Returns description of an extension's version.
getDistributionImage()  : string
Returns distribution image url.
getDistributionWelcomeImage()  : string
Returns distribution welcome image url.
getDocumentationLink()  : string
Returns documentation link.
getDownloadcounter()  : int
Returns download number of an extension's version.
getExtkey()  : string
Returns key of an extension.
getLastuploaddate()  : int
Returns last uploaddate of an extension's version.
getOwnerusername()  : string
Returns username of extension owner.
getReviewstate()  : int
Returns review state of an extension's version.
getState()  : string
Returns state of an extension's version.
getT3xfilemd5()  : string
Returns t3x file hash of an extension's version.
getTitle()  : string
Returns title of an extension's version.
getUploadcomment()  : string
Returns extension upload comment.
getVersion()  : string
Returns version number as unparsed string.
isValidVersionNumber()  : bool
Whether the current version number is valid
notify()  : void
Method notifies attached observers.
parseXml()  : void
Method parses an extensions.xml file.
characterData()  : mixed
Method is invoked when parser accesses any character other than elements.
endElement()  : mixed
Method is invoked when parser accesses end tag of an element.
resetProperties()  : void
Method resets version class properties.
startElement()  : mixed
Method is invoked when parser accesses start tag of an element.

Properties

$artifactSha256

protected string $artifactSha256 = ''

$authorcompany

Parsed property data

protected string $authorcompany = ''

$authoremail

protected string $authoremail = ''

$authorname

protected string $authorname = ''

$composerName

protected string $composerName = ''

$dependencies

protected string $dependencies = ''

$description

protected string $description = ''

$distributionImage

protected string $distributionImage = ''

$distributionWelcomeImage

protected string $distributionWelcomeImage = ''
protected string $documentationLink = ''

$elementData

Keeps current data of element to process.

protected string $elementData = ''

$extensionDownloadCounter

protected int $extensionDownloadCounter = 0

$extensionKey

protected string $extensionKey = ''

$lastuploaddate

protected int $lastuploaddate = 0

$observers

Keeps list of attached observers.

protected SplObserver[] $observers = []

$ownerusername

protected string $ownerusername = ''

$reviewstate

protected int $reviewstate = 0

$t3xfilemd5

protected string $t3xfilemd5 = ''

$uploadcomment

protected string $uploadcomment = ''

$versionDownloadCounter

protected int $versionDownloadCounter = 0

Methods

attach()

Method attaches an observer.

public attach(SplObserver $observer) : void

Parameters

$observer : SplObserver

an observer to attach

Tags

see
detach()
see
notify()

detach()

Method detaches an attached observer

public detach(SplObserver $observer) : void

Parameters

$observer : SplObserver

an observer to detach

getAlldownloadcounter()

Returns download number sum of all extension's versions.

public getAlldownloadcounter() : int

Return values

int

getArtifactSha256()

Returns the SHA-256 hash of the zip artifact of an extension's version.

public getArtifactSha256() : string

Empty for remotes that do not publish it, and for versions uploaded before the remote started to record it.

Return values

string

getAuthorcompany()

Returns company name of extension author.

public getAuthorcompany() : string

Return values

string

getAuthoremail()

Returns e-mail address of extension author.

public getAuthoremail() : string

Return values

string

getAuthorname()

Returns name of extension author.

public getAuthorname() : string

Return values

string

getCategory()

Returns category of an extension.

public getCategory() : string

Return values

string

getComposerName()

Returns the composer package name of an extension's version.

public getComposerName() : string

Return values

string

getDependencies()

Returns dependencies of an extension's version as a serialized string

public getDependencies() : string

Return values

string

getDescription()

Returns description of an extension's version.

public getDescription() : string

Return values

string

getDistributionImage()

Returns distribution image url.

public getDistributionImage() : string

Return values

string

getDistributionWelcomeImage()

Returns distribution welcome image url.

public getDistributionWelcomeImage() : string

Return values

string

Returns documentation link.

public getDocumentationLink() : string

Return values

string

getDownloadcounter()

Returns download number of an extension's version.

public getDownloadcounter() : int

Return values

int

getExtkey()

Returns key of an extension.

public getExtkey() : string

Return values

string

getLastuploaddate()

Returns last uploaddate of an extension's version.

public getLastuploaddate() : int

Return values

int

getOwnerusername()

Returns username of extension owner.

public getOwnerusername() : string

Return values

string

getReviewstate()

Returns review state of an extension's version.

public getReviewstate() : int

Return values

int

getState()

Returns state of an extension's version.

public getState() : string

Return values

string

getT3xfilemd5()

Returns t3x file hash of an extension's version.

public getT3xfilemd5() : string

Return values

string

getTitle()

Returns title of an extension's version.

public getTitle() : string

Return values

string

getUploadcomment()

Returns extension upload comment.

public getUploadcomment() : string

Return values

string

getVersion()

Returns version number as unparsed string.

public getVersion() : string

Return values

string

isValidVersionNumber()

Whether the current version number is valid

public isValidVersionNumber() : bool

Return values

bool

notify()

Method notifies attached observers.

public notify() : void

parseXml()

Method parses an extensions.xml file.

public parseXml(string $file) : void

Parameters

$file : string

GZIP stream resource

Tags

throws
ExtensionManagerException

in case of parse errors

characterData()

Method is invoked when parser accesses any character other than elements.

protected characterData(resource|XmlParser $parser, string $data) : mixed

Parameters

$parser : resource|XmlParser

XmlParser with PHP >= 8

$data : string

An element's value

endElement()

Method is invoked when parser accesses end tag of an element.

protected endElement(resource $parser, string $elementName) : mixed

Parameters

$parser : resource

parser resource

$elementName : string

Element name at parser's current position

resetProperties()

Method resets version class properties.

protected resetProperties([bool $resetAll = false ]) : void

Parameters

$resetAll : bool = false

If TRUE, additionally extension properties are reset

startElement()

Method is invoked when parser accesses start tag of an element.

protected startElement(resource $parser, string $elementName, array $attrs) : mixed

Parameters

$parser : resource

parser resource

$elementName : string

element name at parser's current position

$attrs : array

array of an element's attributes if available

On this page