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.
This class is a specific ExtensionManager implementation and is not part of the Public TYPO3 API.
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
= ''
$category
protected
string
$category
= ''
$composerName
protected
string
$composerName
= ''
$dependencies
protected
string
$dependencies
= ''
$description
protected
string
$description
= ''
$distributionImage
protected
string
$distributionImage
= ''
$distributionWelcomeImage
protected
string
$distributionWelcomeImage
= ''
$documentationLink
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
$state
protected
string
$state
= ''
$t3xfilemd5
protected
string
$t3xfilemd5
= ''
$title
protected
string
$title
= ''
$uploadcomment
protected
string
$uploadcomment
= ''
$version
protected
string
$version
= ''
$versionDownloadCounter
protected
int
$versionDownloadCounter
= 0
Methods
__construct()
public
__construct() : mixed
attach()
Method attaches an observer.
public
attach(SplObserver $observer) : void
Parameters
- $observer : SplObserver
-
an observer to attach
Tags
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
intgetArtifactSha256()
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
stringgetAuthorcompany()
Returns company name of extension author.
public
getAuthorcompany() : string
Return values
stringgetAuthoremail()
Returns e-mail address of extension author.
public
getAuthoremail() : string
Return values
stringgetAuthorname()
Returns name of extension author.
public
getAuthorname() : string
Return values
stringgetCategory()
Returns category of an extension.
public
getCategory() : string
Return values
stringgetComposerName()
Returns the composer package name of an extension's version.
public
getComposerName() : string
Return values
stringgetDependencies()
Returns dependencies of an extension's version as a serialized string
public
getDependencies() : string
Return values
stringgetDescription()
Returns description of an extension's version.
public
getDescription() : string
Return values
stringgetDistributionImage()
Returns distribution image url.
public
getDistributionImage() : string
Return values
stringgetDistributionWelcomeImage()
Returns distribution welcome image url.
public
getDistributionWelcomeImage() : string
Return values
stringgetDocumentationLink()
Returns documentation link.
public
getDocumentationLink() : string
Return values
stringgetDownloadcounter()
Returns download number of an extension's version.
public
getDownloadcounter() : int
Return values
intgetExtkey()
Returns key of an extension.
public
getExtkey() : string
Return values
stringgetLastuploaddate()
Returns last uploaddate of an extension's version.
public
getLastuploaddate() : int
Return values
intgetOwnerusername()
Returns username of extension owner.
public
getOwnerusername() : string
Return values
stringgetReviewstate()
Returns review state of an extension's version.
public
getReviewstate() : int
Return values
intgetState()
Returns state of an extension's version.
public
getState() : string
Return values
stringgetT3xfilemd5()
Returns t3x file hash of an extension's version.
public
getT3xfilemd5() : string
Return values
stringgetTitle()
Returns title of an extension's version.
public
getTitle() : string
Return values
stringgetUploadcomment()
Returns extension upload comment.
public
getUploadcomment() : string
Return values
stringgetVersion()
Returns version number as unparsed string.
public
getVersion() : string
Return values
stringisValidVersionNumber()
Whether the current version number is valid
public
isValidVersionNumber() : bool
Return values
boolnotify()
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
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