add XML schema definition for the DebugBundle

This commit is contained in:
Christian Flothmann 2014-10-27 19:25:03 +01:00
parent 65b6594a98
commit d9c239d947
2 changed files with 29 additions and 0 deletions

View File

@ -38,4 +38,20 @@ class DebugExtension extends Extension
->addMethodCall('setMaxItems', array($config['max_items']))
->addMethodCall('setMaxString', array($config['max_string_length']));
}
/**
* {@inheritdoc}
*/
public function getXsdValidationBasePath()
{
return __DIR__.'/../Resources/config/schema';
}
/**
* {@inheritdoc}
*/
public function getNamespace()
{
return 'http://symfony.com/schema/dic/debug';
}
}

View File

@ -0,0 +1,13 @@
<?xml version="1.0" encoding="UTF-8" ?>
<xsd:schema xmlns="http://symfony.com/schema/dic/debug"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
targetNamespace="http://symfony.com/schema/dic/debug"
elementFormDefault="qualified">
<xsd:element name="config" type="config" />
<xsd:complexType name="config">
<xsd:attribute name="max-items" type="xsd:integer" />
<xsd:attribute name="max-string-length" type="xsd:integer" />
</xsd:complexType>
</xsd:schema>