A configuration represented in XML.
The XML syntax of FeatureIDE configurations is used. A short valid configuration (for the example model at \FeaturePhp\Model\XmlModel) might look like this:
<configuration>
<feature automatic="selected" manual="undefined" name="root feature"/>
</configuration>
It is recommended to generate a configuration using FeatureIDE's graphical configuration editor.
package | Default |
---|
__construct(\FeaturePhp\Helper\XmlParser $xmlParser)
\FeaturePhp\Helper\XmlParser
emptyInstance() : \FeaturePhp\Model\XmlConfiguration
\FeaturePhp\Model\XmlConfiguration
fromFile(string $fileName) : \FeaturePhp\Model\XmlConfiguration
string
\FeaturePhp\Model\XmlConfiguration
fromRequest(string $key, boolean $allowEmpty = false
) : \FeaturePhp\Model\XmlConfiguration
For simple usage, the configuration can be read from GET, POST or cookie. A note on security: This function is safe to use in production scenarios (assuming the safety of the SimpleXML parser) because a configuration is always validated against the feature model.
string
the variable in the request
boolean
whether to throw an exception when no configuration is present
\FeaturePhp\Model\XmlConfiguration
fromString(string $str, string $directory = null
) : \FeaturePhp\Model\XmlConfiguration
string
string
ignored
\FeaturePhp\Model\XmlConfiguration
getSelectedFeatureNames() : array<mixed,string>
array<mixed,string>
getValues() : array<mixed,string>
array<mixed,string>
getXml() : \SimpleXMLElement
\SimpleXMLElement
getXmlParser() : \FeaturePhp\Helper\XmlParser
\FeaturePhp\Helper\XmlParser
$selectedFeatureNames : array<mixed,string>
$values : array<mixed,string>
$xml : \SimpleXMLElement
$xmlParser : \FeaturePhp\Helper\XmlParser