Skip to content

ObjectStorageMap

Properties

items

private array $items

factories

private \SplObjectStorage $factories

protected

private \SplObjectStorage $protected

frozen

private array $frozen

raw

private array $raw

keys

private array $keys

Methods

__construct

public __construct(array $items = []): mixed

Parameters:

Parameter Type Description
$items array Pre-populate set with this key-value array

set

Set data key to value.

public set(string $key, mixed $value): void

Parameters:

Parameter Type Description
$key string The data key
$value mixed The data value

get

Get data value with key.

public get(string $key): mixed

Parameters:

Parameter Type Description
$key string The data key

Return Value:

The data value.

Throws:


replace

Add data to set.

public replace(array $items): void

Parameters:

Parameter Type Description
$items array Key-value array of data to append to this set

all

Fetch set data.

public all(): array

Return Value:

This set's key-value data array


keys

Fetch set data keys.

public keys(): array

Return Value:

This set's key-value data array keys


has

Does this set contain a key?

public has(string $key): bool

Parameters:

Parameter Type Description
$key string The data key

remove

Remove value with key from this set.

public remove(string $key): void

Parameters:

Parameter Type Description
$key string The data key

__get

public __get(string $key): mixed

Parameters:

Parameter Type Description
$key string The data key.

Throws:


__set

public __set(string $key, mixed $value): mixed

Parameters:

Parameter Type Description
$key string The data key
$value mixed The data value

__isset

public __isset(string $key): bool

Parameters:

Parameter Type Description
$key string The data key

__unset

public __unset(string $key): mixed

Parameters:

Parameter Type Description
$key string The data key

clear

Clear all items.

public clear(): void

offsetExists

Array Access

public offsetExists(mixed $offset): bool

Parameters:

Parameter Type Description
$offset mixed

offsetGet

public offsetGet(mixed $key): mixed

Parameters:

Parameter Type Description
$key mixed

Throws:


offsetSet

public offsetSet(mixed $key, mixed $value): void

Parameters:

Parameter Type Description
$key mixed
$value mixed

offsetUnset

public offsetUnset(mixed $key): void

Parameters:

Parameter Type Description
$key mixed

count

Countable

public count(): int

getIterator

IteratorAggregate

public getIterator(): \ArrayIterator

singleton

Ensure a value or object will remain globally unique.

public singleton(string $key, callable $value): void

Parameters:

Parameter Type Description
$key string The value or object name
$value callable The closure that defines the object

factory

Marks a callable as being a factory service.

public factory(callable $callable): callable

Parameters:

Parameter Type Description
$callable callable

Throws:


protect

Protects a callable from being interpreted as a service.

public protect(callable $callable): callable

Parameters:

Parameter Type Description
$callable callable A closure to keep from being invoked and evaluated.

Throws:


raw

Gets a parameter or the closure defining an object.

public raw(string $key): mixed

Parameters:

Parameter Type Description
$key string

Throws:


extend

Extends an object definition.

public extend(string $key, callable $callable): callable

Useful when you want to extend an existing object definition, without necessarily loading that object.

Parameters:

Parameter Type Description
$key string
$callable callable

Throws:


register

Registers a service provider.

public register(\Qubus\Support\Container\ServiceProvider $provider, array $values = []): static

Parameters:

Parameter Type Description
$provider \Qubus\Support\Container\ServiceProvider A ServiceProvider instance.
$values array An array of values that customizes the provider


Automatically generated on 2025-10-13