ServiceFactory

Implements \Kocuj\Di\Service\ServiceFactoryInterface

Service factory

package

Kocuj\Di\Service

Methods

Constructor

__construct(\Kocuj\Di\ArgumentParser\ArgumentParserFactoryInterface $argumentParserFactory) 
codeCoverageIgnore

Arguments

$argumentParserFactory

\Kocuj\Di\ArgumentParser\ArgumentParserFactoryInterface

Service argument parser factory

Create standard or shared service

create(\Kocuj\Di\Container\ContainerInterface $container, \Kocuj\Di\Service\ServiceType $serviceType, string $id, string $source, array $arguments = array()) : \Kocuj\Di\Service\ServiceInterface
see \Kocuj\Di\Service\ServiceFactoryInterface::create()
codeCoverageIgnore
Throws
\Kocuj\Di\Service\Exception

Arguments

$container

\Kocuj\Di\Container\ContainerInterface

Dependency injection container for services

$serviceType

\Kocuj\Di\Service\ServiceType

Service type

$id

string

Service identifier

$source

string

Source for service to create

$arguments

array

Service arguments to parse

Response

\Kocuj\Di\Service\ServiceInterface

Service creator object

Properties

Service argument parser factory

argumentParserFactory : \Kocuj\Di\ArgumentParser\ArgumentParserFactoryInterface