class provider_collection extends service_collection

Collection of auth providers to be configured at container compile time.

Properties

protected ContainerInterface $container from  service_collection
protected array $service_classes from  service_collection
protected config $config

Methods

__construct(ContainerInterface $container, config $config)

Constructor

getIterator()

{@inheritdoc}

offsetGet($index)

{@inheritdoc}

void
add(string $name)

Add a service to the collection

add_service_class(string $service_id, string $class)

Add a service's class to the collection

array
get_service_classes()

Get services' classes

mixed
get_by_class($class)

Returns the service associated to a class

object
get_provider(string $provider_name = '')

Get an auth provider.

Details

at line 32
__construct(ContainerInterface $container, config $config)

Constructor

Parameters

ContainerInterface $container

Container object

config $config

phpBB config

in service_collection at line 47
getIterator()

{@inheritdoc}

in service_collection at line 55
offsetGet($index)

{@inheritdoc}

Parameters

$index

in service_collection at line 66
void add(string $name)

Add a service to the collection

Parameters

string $name

The service name

Return Value

void

in service_collection at line 77
add_service_class(string $service_id, string $class)

Add a service's class to the collection

Parameters

string $service_id
string $class

in service_collection at line 87
array get_service_classes()

Get services' classes

Return Value

array

in service_collection at line 98
mixed get_by_class($class)

Returns the service associated to a class

Parameters

$class

Return Value

mixed

Exceptions

RuntimeException

at line 50
object get_provider(string $provider_name = '')

Get an auth provider.

Parameters

string $provider_name

The name of the auth provider

Return Value

object

Default auth provider selected in config if it does exist. Otherwise the standard db auth provider.

Exceptions

RuntimeException