ChordXmlParser
in package
implements
ChordXmlParserInterface
Chord 1.0 XML document parser.
Interfaces, Classes, Traits and Enums
- ChordXmlParserInterface
- Chord 1.0 XML document parser.
Table of Contents
- parse() : Chord
- Parses the given XML document.
- parseAlternativeNames() : array<string|int, string>
- Extracts alternative chord names from the XML.
- parseDefinition() : ChordDefinition
- Parses chord definition.
- parseMarks() : array<string|int, ChordMark>
- Extracts chord marks from the document.
- parseNotes() : array<string|int, ChordNote>
- Extracts chord notes from the document.
Methods
parse()
Parses the given XML document.
public
parse(string $xml) : Chord
Parameters
- $xml : string
-
XML string
Tags
Return values
Chord —parsed object
parseAlternativeNames()
Extracts alternative chord names from the XML.
private
parseAlternativeNames(SimpleXMLElement $sxml) : array<string|int, string>
Parameters
- $sxml : SimpleXMLElement
-
XML document
Tags
Return values
array<string|int, string> —alternative chord names
parseDefinition()
Parses chord definition.
private
parseDefinition(SimpleXMLElement $sxml) : ChordDefinition
Parameters
- $sxml : SimpleXMLElement
-
XML document
Tags
Return values
ChordDefinition —chord definition
parseMarks()
Extracts chord marks from the document.
private
parseMarks(SimpleXMLElement $sxml) : array<string|int, ChordMark>
Parameters
- $sxml : SimpleXMLElement
-
XML document
Tags
Return values
array<string|int, ChordMark> —chord marks
parseNotes()
Extracts chord notes from the document.
private
parseNotes(SimpleXMLElement $sxml) : array<string|int, ChordNote>
Parameters
- $sxml : SimpleXMLElement
-
XML document
Tags
Return values
array<string|int, ChordNote> —chord notes