update composer dependencies and add filsesystem component
This commit is contained in:
@@ -63,9 +63,29 @@ class XmlFileLoader extends FileLoader
|
||||
|
||||
$this->parseParameters($xml);
|
||||
|
||||
$this->parseCommands($xml);
|
||||
|
||||
$this->parseDefinitions($xml, $path);
|
||||
}
|
||||
|
||||
protected function parseCommands(SimpleXMLElement $xml)
|
||||
{
|
||||
if (false === $commands = $xml->xpath('//config:commands/config:command')) {
|
||||
return;
|
||||
}
|
||||
try {
|
||||
$commandConfig = $this->container->getParameter("command.definition");
|
||||
} catch (\Symfony\Component\DependencyInjection\Exception\ParameterNotFoundException $e) {
|
||||
$commandConfig = array();
|
||||
}
|
||||
|
||||
foreach ($commands as $command) {
|
||||
array_push($commandConfig, $command->getAttributeAsPhp("class"));
|
||||
}
|
||||
|
||||
$this->container->setParameter("command.definition", $commandConfig);
|
||||
}
|
||||
|
||||
/**
|
||||
* Parses parameters
|
||||
*
|
||||
|
||||
@@ -64,6 +64,16 @@
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
|
||||
<xsd:complexType name="commands">
|
||||
<xsd:choice minOccurs="1" maxOccurs="unbounded" >
|
||||
<xsd:element name="loop" type="command"/>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
|
||||
<xsd:complexType name="command">
|
||||
<xsd:attribute name="class" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
|
||||
<xsd:complexType name="filters">
|
||||
<xsd:choice minOccurs="1" maxOccurs="unbounded">
|
||||
<xsd:element name="filter" type="filter" />
|
||||
|
||||
Reference in New Issue
Block a user