PHP Class ZF\Apigility\Doctrine\Server\Resource\DoctrineResourceFactory

Inheritance: implements Zend\ServiceManager\AbstractFactoryInterface
Afficher le fichier Open project: zfcampus/zf-apigility-doctrine

Méthodes publiques

Méthode Description
__invoke ( Interop\Container\ContainerInterface $container, string $requestedName, array $options = null ) : DoctrineResource Create and return the doctrine-connected resource.
canCreate ( Interop\Container\ContainerInterface $container, string $requestedName ) : boolean Can this factory create the requested service?
canCreateServiceWithName ( Zend\ServiceManager\ServiceLocatorInterface $container, string $name, string $requestedName ) : boolean Can this factory create the requested service? (v2)
createServiceWithName ( Zend\ServiceManager\ServiceLocatorInterface $container, string $name, string $requestedName ) : DoctrineResource Create and return the doctrine-connected resource (v2).

Méthodes protégées

Méthode Description
getResourceClassFromConfig ( array $config, string $requestedName ) : string Retrieve the resource class based on the provided configuration.
isValidConfig ( array $config, string $requestedName, Interop\Container\ContainerInterface $container ) : boolean Tests if the configuration is valid
loadConfiguredListeners ( Interop\Container\ContainerInterface $container, array $config ) : array
loadHydrator ( Interop\Container\ContainerInterface $container, array $doctrineConnectedConfig, array $doctrineHydratorConfig ) : Zend\Hydrator\HydratorInterface
loadQueryCreateFilter ( Interop\Container\ContainerInterface $container, array $config, Doctrine\Common\Persistence\ObjectManager $objectManager ) : ZF\Apigility\Doctrine\Server\Query\CreateFilter\QueryCreateFilterInterface
loadQueryProviders ( Interop\Container\ContainerInterface $serviceLocator, array $config, Doctrine\Common\Persistence\ObjectManager $objectManager ) : array
normalizeClassname ( string $className ) : string

Method Details

__invoke() public méthode

Create and return the doctrine-connected resource.
public __invoke ( Interop\Container\ContainerInterface $container, string $requestedName, array $options = null ) : DoctrineResource
$container Interop\Container\ContainerInterface
$requestedName string
$options array
Résultat DoctrineResource

canCreate() public méthode

Can this factory create the requested service?
public canCreate ( Interop\Container\ContainerInterface $container, string $requestedName ) : boolean
$container Interop\Container\ContainerInterface
$requestedName string
Résultat boolean

canCreateServiceWithName() public méthode

Provided for backwards compatiblity; proxies to canCreate().
public canCreateServiceWithName ( Zend\ServiceManager\ServiceLocatorInterface $container, string $name, string $requestedName ) : boolean
$container Zend\ServiceManager\ServiceLocatorInterface
$name string
$requestedName string
Résultat boolean

createServiceWithName() public méthode

Provided for backwards compatibility; proxies to __invoke().
public createServiceWithName ( Zend\ServiceManager\ServiceLocatorInterface $container, string $name, string $requestedName ) : DoctrineResource
$container Zend\ServiceManager\ServiceLocatorInterface
$name string
$requestedName string
Résultat DoctrineResource

getResourceClassFromConfig() protected méthode

Defaults to ZF\Apigility\Doctrine\Server\Resource\DoctrineResource.
protected getResourceClassFromConfig ( array $config, string $requestedName ) : string
$config array
$requestedName string
Résultat string

isValidConfig() protected méthode

If the configuration has a "object_manager" key, and that service exists, then the configuration is valid.
protected isValidConfig ( array $config, string $requestedName, Interop\Container\ContainerInterface $container ) : boolean
$config array
$requestedName string
$container Interop\Container\ContainerInterface
Résultat boolean

loadConfiguredListeners() protected méthode

protected loadConfiguredListeners ( Interop\Container\ContainerInterface $container, array $config ) : array
$container Interop\Container\ContainerInterface
$config array
Résultat array

loadHydrator() protected méthode

protected loadHydrator ( Interop\Container\ContainerInterface $container, array $doctrineConnectedConfig, array $doctrineHydratorConfig ) : Zend\Hydrator\HydratorInterface
$container Interop\Container\ContainerInterface
$doctrineConnectedConfig array
$doctrineHydratorConfig array
Résultat Zend\Hydrator\HydratorInterface

loadQueryCreateFilter() protected méthode

protected loadQueryCreateFilter ( Interop\Container\ContainerInterface $container, array $config, Doctrine\Common\Persistence\ObjectManager $objectManager ) : ZF\Apigility\Doctrine\Server\Query\CreateFilter\QueryCreateFilterInterface
$container Interop\Container\ContainerInterface
$config array
$objectManager Doctrine\Common\Persistence\ObjectManager
Résultat ZF\Apigility\Doctrine\Server\Query\CreateFilter\QueryCreateFilterInterface

loadQueryProviders() protected méthode

protected loadQueryProviders ( Interop\Container\ContainerInterface $serviceLocator, array $config, Doctrine\Common\Persistence\ObjectManager $objectManager ) : array
$serviceLocator Interop\Container\ContainerInterface
$config array
$objectManager Doctrine\Common\Persistence\ObjectManager
Résultat array

normalizeClassname() protected méthode

protected normalizeClassname ( string $className ) : string
$className string
Résultat string