Spork Code Libraries

ClassAbstractFactory

Generic abstract factory that will create and configure an instance for any service as long as the service name has an entry in the configuration and the configuration includes a class name.

Summary

Implements

Methods

canCreateServiceWithName()

canCreateServiceWithName(\Zend\ServiceManager\ServiceLocatorInterface  $serviceLocator, string  $name, string  $requestedName) : boolean

Test if configuration exists and has class field

Parameters

\Zend\ServiceManager\ServiceLocatorInterface $serviceLocator
string $name
string $requestedName

Returns

boolean
See also

createServiceWithName()

createServiceWithName(\Zend\ServiceManager\ServiceLocatorInterface  $serviceLocator, string  $name, string  $requestedName) : mixed

Create and configure class by creating new instance of class from configuration

Parameters

\Zend\ServiceManager\ServiceLocatorInterface $serviceLocator
string $name
string $requestedName

Returns

mixed
See also

getClass()

getClass(array  $config, string  $name) : boolean

Look for class name in configuration

Parameters

array $config
string $name

Returns

boolean