You are here

ProjectExtension.php in Service Container 7

File

modules/providers/service_container_symfony/lib/Symfony/Component/DependencyInjection/Tests/Fixtures/includes/ProjectExtension.php
View source
<?php

use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\DependencyInjection\Definition;
use Symfony\Component\DependencyInjection\Extension\ExtensionInterface;
class ProjectExtension implements ExtensionInterface {
  public function load(array $configs, ContainerBuilder $configuration) {
    $config = call_user_func_array('array_merge', $configs);
    $configuration
      ->setDefinition('project.service.bar', new Definition('FooClass'));
    $configuration
      ->setParameter('project.parameter.bar', isset($config['foo']) ? $config['foo'] : 'foobar');
    $configuration
      ->setDefinition('project.service.foo', new Definition('FooClass'));
    $configuration
      ->setParameter('project.parameter.foo', isset($config['foo']) ? $config['foo'] : 'foobar');
    return $configuration;
  }
  public function getXsdValidationBasePath() {
    return false;
  }
  public function getNamespace() {
    return 'http://www.example.com/schema/project';
  }
  public function getAlias() {
    return 'project';
  }
  public function getConfiguration(array $config, ContainerBuilder $container) {
  }

}

Classes

Namesort descending Description
ProjectExtension