forked from GNUsocial/gnu-social
22 lines
558 B
PHP
22 lines
558 B
PHP
|
<?php
|
||
|
namespace ZendBench\ServiceManager\BenchAsset;
|
||
|
|
||
|
use Zend\ServiceManager\AbstractFactoryInterface;
|
||
|
use Zend\ServiceManager\ServiceLocatorInterface;
|
||
|
|
||
|
class AbstractFactoryFoo implements AbstractFactoryInterface
|
||
|
{
|
||
|
public function canCreateServiceWithName(ServiceLocatorInterface $serviceLocator, $name, $requestedName)
|
||
|
{
|
||
|
if ($name != 'foo') {
|
||
|
return false;
|
||
|
}
|
||
|
return true;
|
||
|
}
|
||
|
|
||
|
public function createServiceWithName(ServiceLocatorInterface $serviceLocator, $name, $requestedName)
|
||
|
{
|
||
|
return new Foo();
|
||
|
}
|
||
|
}
|