This repository has been archived on 2023-08-20. You can view files and clone it, but cannot push or open issues or pull requests.
symfony/tests/Symfony/Tests/Component/DependencyInjection/Fixtures/php/services_interfaces-1-1.php
2010-11-30 20:36:56 +01:00

71 lines
1.7 KiB
PHP
Executable File

<?php
use Symfony\Component\DependencyInjection\ContainerInterface;
use Symfony\Component\DependencyInjection\TaggedContainerInterface;
use Symfony\Component\DependencyInjection\Container;
use Symfony\Component\DependencyInjection\Reference;
use Symfony\Component\DependencyInjection\Parameter;
use Symfony\Component\DependencyInjection\ParameterBag\FrozenParameterBag;
/**
* ProjectServiceContainer
*
* This class has been auto-generated
* by the Symfony Dependency Injection Component.
*/
class ProjectServiceContainer extends Container implements TaggedContainerInterface
{
/**
* Constructor.
*/
public function __construct()
{
parent::__construct(new FrozenParameterBag($this->getDefaultParameters()));
}
/**
* Gets the 'foo' service.
*
* This service is shared.
* This method always returns the same instance of the service.
*
* @return FooClass A FooClass instance.
*/
protected function getFooService()
{
$this->services['foo'] = $instance = new \FooClass();
$instance->setBar('someValue');
return $instance;
}
/**
* Returns service ids for a given tag.
*
* @param string $name The tag name
*
* @return array An array of tags
*/
public function findTaggedServiceIds($name)
{
static $tags = array(
);
return isset($tags[$name]) ? $tags[$name] : array();
}
/**
* Gets the default parameters.
*
* @return array An array of the default parameters
*/
protected function getDefaultParameters()
{
return array(
'cla' => 'Fo',
'ss' => 'Class',
);
}
}