class DefaultProviders

Core framework service providers loaded for every Hypervel application.

Only providers that are part of the framework itself belong here — services that every app needs regardless of what it does (database, cache, session, encryption, validation, etc.) plus Swoole infrastructure (engine, server, object-pool, signal).

Optional/standalone packages (Reverb, Scout, Horizon, Sanctum, etc.) must not be added here. They register their own providers via composer.json extra.hypervel.providers and are auto-discovered when installed. Tests for these packages register the provider via the test class's getPackageProviders() method.

Properties

protected array $providers

The current providers.

Methods

__construct(array|null $providers = null)

Create a new default provider collection.

merge(array $providers)

Merge the given providers into the provider collection.

replace(array $replacements)

Replace the given providers with other providers.

except(array $providers)

Disable the given providers.

array
toArray()

Convert the provider collection to an array.

Details

at line 31
__construct(array|null $providers = null)

Create a new default provider collection.

Parameters

array|null $providers

at line 70
DefaultProviders merge(array $providers)

Merge the given providers into the provider collection.

Parameters

array $providers

Return Value

DefaultProviders

at line 80
DefaultProviders replace(array $replacements)

Replace the given providers with other providers.

Parameters

array $replacements

Return Value

DefaultProviders

at line 96
DefaultProviders except(array $providers)

Disable the given providers.

Parameters

array $providers

Return Value

DefaultProviders

at line 107
array toArray()

Convert the provider collection to an array.

Return Value

array