PHP 클래스 ContainerInteropDoctrine\AbstractFactory

파일 보기 프로젝트 열기: dasprid/container-interop-doctrine 1 사용 예제들

공개 메소드들

메소드 설명
__callStatic ( string $name, array $arguments ) : mixed Creates a new instance from a specified config, specifically meant to be used as static factory.
__construct ( string $configKey = 'orm_default' )
__invoke ( Interop\Container\ContainerInterface $container ) : mixed

보호된 메소드들

메소드 설명
createWithConfig ( Interop\Container\ContainerInterface $container, string $configKey ) : mixed Creates a new instance from a specified config.
getDefaultConfig ( string $configKey ) : array Returns the default config.
retrieveConfig ( Interop\Container\ContainerInterface $container, string $configKey, string $section ) : array Retrieves the config for a specific section.
retrieveDependency ( Interop\Container\ContainerInterface $container, string $configKey, string $section, string $factoryClassName ) : mixed Retrieves a dependency through the container.

메소드 상세

__callStatic() 공개 정적인 메소드

In case you want to use another config key than "orm_default", you can add the following factory to your config: [SpecificFactory::class, 'orm_other'], ];
public static __callStatic ( string $name, array $arguments ) : mixed
$name string
$arguments array
리턴 mixed

__construct() 공개 메소드

public __construct ( string $configKey = 'orm_default' )
$configKey string

__invoke() 공개 메소드

public __invoke ( Interop\Container\ContainerInterface $container ) : mixed
$container Interop\Container\ContainerInterface
리턴 mixed

createWithConfig() 추상적인 보호된 메소드

Creates a new instance from a specified config.
abstract protected createWithConfig ( Interop\Container\ContainerInterface $container, string $configKey ) : mixed
$container Interop\Container\ContainerInterface
$configKey string
리턴 mixed

getDefaultConfig() 추상적인 보호된 메소드

Returns the default config.
abstract protected getDefaultConfig ( string $configKey ) : array
$configKey string
리턴 array

retrieveConfig() 보호된 메소드

Retrieves the config for a specific section.
protected retrieveConfig ( Interop\Container\ContainerInterface $container, string $configKey, string $section ) : array
$container Interop\Container\ContainerInterface
$configKey string
$section string
리턴 array

retrieveDependency() 보호된 메소드

If the container does not know about the dependency, it is pulled from a fresh factory. This saves the user from registering factories which they are not gonna access themself at all, and thus minimized configuration.
protected retrieveDependency ( Interop\Container\ContainerInterface $container, string $configKey, string $section, string $factoryClassName ) : mixed
$container Interop\Container\ContainerInterface
$configKey string
$section string
$factoryClassName string
리턴 mixed