A feature model represented in XML.
The XML syntax of FeatureIDE feature models is used. A short valid model might look like this:
<featureModel>
<struct>
<and abstract="true" mandatory="true" name="root feature"></and>
</struct>
<constraints></constraints>
</featureModel>
It is recommended to generate a model using FeatureIDE's graphical feature model editor.
| package | Default |
|---|
__construct(\FeaturePhp\Helper\XmlParser $xmlParser)
\FeaturePhp\Helper\XmlParser
fromFile(string $fileName) : \FeaturePhp\Model\XmlModel
string
\FeaturePhp\Model\XmlModelfromString(string $str, string $directory = null) : \FeaturePhp\Model\XmlModel
string
stringignored
\FeaturePhp\Model\XmlModelgetRoot() : \SimpleXMLElement
\SimpleXMLElementgetRules() : array<mixed,\SimpleXMLElement>
array<mixed,\SimpleXMLElement>getXml() : \SimpleXMLElement
\SimpleXMLElementgetXmlParser() : \FeaturePhp\Helper\XmlParser
\FeaturePhp\Helper\XmlParsertraverse(callable $callback)
callablecalled with the current node and its parent
_traverse(\SimpleXMLElement $node, \SimpleXMLElement $parent, callable $callback)
This is a preorder traversal (in particular, the root is visited first).
\SimpleXMLElement
\SimpleXMLElement
callablecallback called with the current node and its parent
$root : \SimpleXMLElement
$rules : array<mixed,\SimpleXMLElement>
$xml : \SimpleXMLElement
$xmlParser : \FeaturePhp\Helper\XmlParser