Zend Framework  3.0
Public Member Functions | List of all members
FactoryInterface Interface Reference

Interface for a factory. More...

Public Member Functions

 __invoke (ContainerInterface $container, $requestedName, array $options=null)
 Create an object.
 

Detailed Description

Interface for a factory.

A factory is an callable object that is able to create an object. It is given the instance of the service locator, the requested name of the class you want to create, and any additional options that could be used to configure the instance state.

Member Function Documentation

__invoke ( ContainerInterface  $container,
  $requestedName,
array  $options = null 
)

Create an object.

Parameters
ContainerInterface$container
string$requestedName
null | array$options
Returns
object
Exceptions
ServiceNotFoundExceptionif unable to resolve the service.
ServiceNotCreatedExceptionif an exception is raised when creating a service.
ContainerExceptionif any other error occurs

Implemented in ServiceListenerFactory, DiStrictAbstractServiceFactory, LazyControllerAbstractFactory, AbstractConfigFactory, ContainerAbstractServiceFactory, DiServiceFactory, NavigationAbstractServiceFactory, RouteInvokableFactory, AdapterAbstractServiceFactory, StorageCacheAbstractServiceFactory, SessionManagerFactory, LoggerAbstractServiceFactory, WriterFactory, ElementFactory, SeparatorToSeparatorFactory, AbstractNavigationFactory, FormAbstractServiceFactory, ConsoleAdapterFactory, ViewHelperManagerFactory, ModuleManagerFactory, DelegatingHydratorFactory, SessionConfigFactory, CallbackFactory, StorageFactory, ControllerManagerFactory, IteratorFactory, DiFactory, InputFilterAbstractServiceFactory, AbstractPluginManagerFactory, ConfigFactory, ViewFeedStrategyFactory, ViewJsonStrategyFactory, TranslatorFactory, DbSelectFactory, DbTableGatewayFactory, HttpRouterFactory, LoaderPluginManagerFactory, EventManagerFactory, ViewTemplatePathStackFactory, FilterPluginManagerFactory, ProcessorPluginManagerFactory, WriterPluginManagerFactory, ApplicationFactory, ViewPrefixPathStackResolverFactory, ViewResolverFactory, ViewTemplateMapResolverFactory, InvokableFactory, PatternPluginManagerFactory, StorageAdapterPluginManagerFactory, StoragePluginManagerFactory, FormElementManagerFactory, TranslatorServiceFactory, FormatterPluginManagerFactory, LoggerServiceFactory, FilterPluginManagerFactory, HydratorPluginManagerFactory, InputFilterPluginManagerFactory, SmtpPluginManagerFactory, HttpDefaultRenderingStrategyFactory, ConsoleRouterFactory, NavigationHelperFactory, AdapterPluginManagerFactory, ScrollingStylePluginManagerFactory, AdapterPluginManagerFactory, ValidatorPluginManagerFactory, AnnotationBuilderFactory, DispatchListenerFactory, HttpExceptionStrategyFactory, HttpRouteNotFoundStrategyFactory, HttpViewManagerFactory, RequestFactory, ResponseFactory, ViewManagerFactory, ConsoleViewManagerFactory, FlashMessengerFactory, IdentityFactory, ForwardFactory, InjectTemplateListenerFactory, ViewFactory, ViewPhpRendererStrategyFactory, DefaultRenderingStrategyFactory, RouterFactory, StorageCacheFactory, ViewPhpRendererFactory, ConsoleExceptionStrategyFactory, ConsoleRouteNotFoundStrategyFactory, DiAbstractServiceFactoryFactory, AdapterServiceFactory, RoutePluginManagerFactory, DiServiceInitializerFactory, DiStrictAbstractServiceFactoryFactory, HttpMethodListenerFactory, IdentityFactory, AbstractFactoryFoo, and FactoryFoo.