tikiwiki/packages/tiki-pkg-tikimanager/symfony/dependency-injection/Tests/Fixtures/BarFactory.php

22 lines
356 B
PHP
Raw Normal View History

2023-11-20 21:52:04 +01:00
<?php
namespace Symfony\Component\DependencyInjection\Tests\Fixtures;
class BarFactory
{
/**
* @var iterable
*/
private $bars;
public function __construct(iterable $bars)
{
$this->bars = iterator_to_array($bars);
}
public function getDefaultBar(): BarInterface
{
return reset($this->bars);
}
}