Zend Framework  3.0
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
FormAbstractServiceFactory Class Reference

Public Member Functions

 __invoke (ContainerInterface $container, $requestedName, array $options=null)
 Create a form (v3)
 
 canCreate (ContainerInterface $container, $requestedName)
 Can we create the requested service? (v3)
 
 canCreateServiceWithName (ServiceLocatorInterface $serviceLocator, $name, $requestedName)
 Can we create the requested service? (v2)
 
 createServiceWithName (ServiceLocatorInterface $serviceLocator, $name, $requestedName)
 Create a form (v2)
 

Protected Member Functions

 getConfig (ContainerInterface $container)
 Get forms configuration, if any.
 
 getFormFactory (ContainerInterface $container)
 Retrieve the form factory, creating it if necessary.
 
 marshalInputFilter (array &$config, ContainerInterface $container, Factory $formFactory)
 Marshal the input filter into the configuration.
 

Protected Attributes

 $config
 
 $configKey = 'forms'
 
 $factory
 

Member Function Documentation

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

Create a form (v3)

Parameters
ContainerInterface$container
string$requestedName
array | null$options
Returns
ElementInterface

Implements FactoryInterface.

canCreate ( ContainerInterface  $container,
  $requestedName 
)

Can we create the requested service? (v3)

Parameters
ContainerInterface$container
string$requestedName
Returns
bool

Implements AbstractFactoryInterface.

canCreateServiceWithName ( ServiceLocatorInterface  $serviceLocator,
  $name,
  $requestedName 
)

Can we create the requested service? (v2)

Parameters
ServiceLocatorInterface$serviceLocator
string$nameService name (as resolved by ServiceManager)
string$requestedNameName by which service was requested
Returns
bool

Implements AbstractFactoryInterface.

createServiceWithName ( ServiceLocatorInterface  $serviceLocator,
  $name,
  $requestedName 
)

Create a form (v2)

Parameters
ServiceLocatorInterface$serviceLocator
string$nameService name (as resolved by ServiceManager)
string$requestedNameName by which service was requested
Returns
Form

Implements AbstractFactoryInterface.

getConfig ( ContainerInterface  $container)
protected

Get forms configuration, if any.

Parameters
ServiceLocatorInterface$container
Returns
array
getFormFactory ( ContainerInterface  $container)
protected

Retrieve the form factory, creating it if necessary.

Parameters
ContainerInterface$services
Returns
Factory
marshalInputFilter ( array &  $config,
ContainerInterface  $container,
Factory  $formFactory 
)
protected

Marshal the input filter into the configuration.

If an input filter is specified:

  • if the InputFilterManager is present, checks if it's there; if so, retrieves it and resets the specification to the instance.
  • otherwise, pulls the input filter factory from the form factory, and attaches the FilterManager and ValidatorManager to it.
Parameters
array$config
ContainerInterface$container
Factory$formFactory

Member Data Documentation

$config
protected
$configKey = 'forms'
protected
$factory
protected