Container
in package
Service container class
Tags
Table of Contents
Properties
- $locators : array<string|int, mixed>
- Array service locators
Methods
- get() : Locator
- Get a service locator
- has() : bool
- Determine if a service locator has been set
- remove() : void
- Remove a service locator
- set() : void
- Set a service locator
Properties
$locators
Array service locators
private
static array<string|int, mixed>
$locators
= ['default' => null]
Methods
get()
Get a service locator
public
static get([string $name = 'default' ]) : Locator
Parameters
- $name : string = 'default'
Tags
Return values
Locatorhas()
Determine if a service locator has been set
public
static has(string $name) : bool
Parameters
- $name : string
Return values
boolremove()
Remove a service locator
public
static remove(string $name) : void
Parameters
- $name : string
set()
Set a service locator
public
static set(string $name, Locator $locator) : void
Parameters
- $name : string
- $locator : Locator