Permalink
Browse files

Refactored DI Extension

  • Loading branch information...
1 parent da39ccb commit 28bf99f219057216473c6015e52e9dc7207f2736 excelwebzone committed Mar 14, 2011
Showing with 3 additions and 39 deletions.
  1. +3 −30 DependencyInjection/EWZTextExtension.php
  2. +0 −9 Resources/config/schema/text-1.0.xsd
@@ -9,42 +9,15 @@
class EWZTextExtension extends Extension
{
- public function load(array $configs, ContainerBuilder $container)
- {
- foreach ($configs as $config) {
- $this->doConfigLoad($config, $container);
- }
- }
-
/**
- * Loads the text configuration.
+ * Loads the configuration.
*
- * @param array $config An array of configuration settings
+ * @param array $configs An array of configuration settings
* @param ContainerBuilder $container A ContainerBuilder instance
*/
- protected function doConfigLoad(array $config, ContainerBuilder $container)
+ public function load(array $configs, ContainerBuilder $container)
{
$loader = new XmlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config'));
$loader->load('templating.xml');
}
-
- /**
- * Returns the base path for the XSD files.
- *
- * @return string The XSD base path
- */
- public function getXsdValidationBasePath()
- {
- return __DIR__.'/../Resources/config/schema';
- }
-
- /**
- * Returns the namespace to be used for this extension (XML namespace).
- *
- * @return string The XML namespace
- */
- public function getNamespace()
- {
- return 'http://symfony.com/schema/dic/ewz/text';
- }
}
@@ -1,9 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-
-<xsd:schema xmlns="http://symfony.com/schema/dic/ewz/time"
- xmlns:xsd="http://www.w3.org/2001/XMLSchema"
- targetNamespace="http://symfony.com/schema/dic/ewz/time"
- elementFormDefault="qualified">
-
- <xsd:element name="config" type="config" />
-</xsd:schema>

0 comments on commit 28bf99f

Please sign in to comment.