HumHub Documentation (unofficial)

Config
in package
implements ConfigInterface

Object for defining configuration and configuring an existing service manager instance.

In order to provide configuration merging capabilities, this class implements the same functionality as Laminas\Stdlib\ArrayUtils::merge(). That routine allows developers to specifically shape how values are merged:

  • A value which is an instance of MergeRemoveKey indicates the value should be removed during merge.
  • A value that is an instance of MergeReplaceKeyInterface indicates that the value it contains should be used to replace any previous versions.

These features are advanced, and not typically used. If you wish to use them, you will need to require the laminas-stdlib package in your application.

Tags
psalm-import-type

ServiceManagerConfigurationType from ConfigInterface

Table of Contents

Interfaces

ConfigInterface

Properties

$config  : array<string, array<string|int, mixed>>
$allowedKeys  : array<string, bool>

Methods

__construct()  : mixed
configureServiceManager()  : ServiceManager
Configure a service manager.
toArray()  : array<string|int, mixed>
Return configuration for a service manager instance as an array.
merge()  : mixed

Properties

$config

protected array<string, array<string|int, mixed>> $config = ['abstract_factories' => [], 'aliases' => [], 'delegators' => [], 'factories' => [], 'initializers' => [], 'invokables' => [], 'lazy_services' => [], 'services' => [], 'shared' => []]
Tags
psalm-var

ServiceManagerConfigurationType

$allowedKeys

private array<string, bool> $allowedKeys = ['abstract_factories' => true, 'aliases' => true, 'delegators' => true, 'factories' => true, 'initializers' => true, 'invokables' => true, 'lazy_services' => true, 'services' => true, 'shared' => true]

Methods

__construct()

public __construct([array<string|int, mixed> $config = [] ]) : mixed
Parameters
$config : array<string|int, mixed> = []
Tags
psalm-param

ServiceManagerConfigurationType $config

toArray()

Return configuration for a service manager instance as an array.

public toArray() : array<string|int, mixed>
Tags
inheritDoc
Return values
array<string|int, mixed>

merge()

private merge(array<string|int, mixed> $a, array<string|int, mixed> $b) : mixed
Parameters
$a : array<string|int, mixed>
$b : array<string|int, mixed>
Tags
psalm-param

ServiceManagerConfigurationType $a

psalm-param

ServiceManagerConfigurationType $b

psalm-return

ServiceManagerConfigurationType

psalm-suppress

MixedReturnTypeCoercion


        
On this page

Search results