update composer dependencies and add filsesystem component

This commit is contained in:
Manuel Raynaud
2013-06-03 12:18:16 +02:00
parent 3631ff48c5
commit c4d8aef962
4 changed files with 113 additions and 35 deletions

View File

@@ -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
*

View File

@@ -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" />