class QueueServiceProvider extends ServiceProvider

Traits

Properties

int $priority

The registration priority for this provider.

from  ServiceProvider
protected array $bootingCallbacks

All of the registered booting callbacks.

from  ServiceProvider
protected array $bootedCallbacks

All of the registered booted callbacks.

from  ServiceProvider
static array $publishes

The paths that should be published.

from  ServiceProvider
static array $publishGroups

The paths that should be published by group.

from  ServiceProvider
static protected array $publishableMigrationPaths

The migration paths available for publishing.

from  ServiceProvider
static array<string, string> $optimizeCommands

Commands that should be run during the "optimize" command.

from  ServiceProvider
static array<string, string> $optimizeClearCommands

Commands that should be run during the "optimize:clear" command.

from  ServiceProvider
static array<string, string> $reloadCommands

Commands that should be run during the "reload" command.

from  ServiceProvider

Methods

__construct(Application $app)

No description

bool
isEnabled()

Determine whether this provider should be registered and booted.

void
register()

Register the service provider.

void
booting(Closure $callback)

Register a booting callback to be run before the "boot" method is called.

void
booted(Closure $callback)

Register a booted callback to be run after the "boot" method is called.

void
callBootingCallbacks()

Call the registered booting callbacks.

void
callBootedCallbacks()

Call the registered booted callbacks.

void
mergeConfigFrom(string $path, string $key)

Merge the given configuration with the existing configuration.

array
mergeableOptions(string $name)

Get configuration arrays whose entries should be merged by name.

void
replaceConfigRecursivelyFrom(string $path, string $key)

Replace the given configuration with the existing configuration recursively.

void
loadRoutesFrom(string $path)

Load the given routes file if routes are not already cached.

void
loadViewsFrom(array|string $path, string $namespace)

Register a view file namespace.

void
loadViewComponentsAs(string $prefix, array $components)

Register the given view components with a custom prefix.

void
loadTranslationsFrom(string $path, string|null $namespace = null)

Register a translation file namespace.

void
loadJsonTranslationsFrom(string $path)

Register a JSON translation file path.

void
loadMigrationsFrom(array|string $paths)

Register database migration paths.

void
callAfterResolving(string $name, Closure $callback)

Setup an after resolving listener, or fire immediately if already resolved.

void
publishesMigrations(array $paths, mixed $groups = null)

Register migration paths to be published by the publish command.

void
publishes(array $paths, mixed $groups = null)

Register paths to be published by the publish command.

void
ensurePublishArrayInitialized(string $class)

Ensure the publish array for the service provider is initialized.

void
addPublishGroup(string $group, array $paths)

Add a publish group / tag to the service provider.

static array
pathsToPublish(string|null $provider = null, string|null $group = null)

Get the paths to publish.

static array|null
pathsForProviderOrGroup(string|null $provider, string|null $group)

Get the paths for the provider or group (or both).

static array
pathsForProviderAndGroup(string $provider, string $group)

Get the paths for the provider and group.

static array
publishableProviders()

Get the service providers available for publishing.

static array
publishableMigrationPaths()

Get the migration paths available for publishing.

static array
publishableGroups()

Get the groups available for publishing.

static bool
addProviderToBootstrapFile(string $provider, string|null $path = null)

Add a provider to the bootstrap provider configuration file.

static bool
removeProviderFromBootstrapFile(string|array $providersToRemove, string|null $path = null, bool $strict = false)

Remove a provider from the bootstrap provider file.

void
optimizes(string|null $optimize = null, string|null $clear = null, string|null $key = null)

Register commands that should run on "optimize".

void
reloads(string $reload, string|null $key = null)

Register commands that should run on "reload".

string
getProviderKey(string|null $key = null)

Get a short descriptive key for the current service provider.

void
commands(array $commands)

Register the package's custom Artisan commands.

void
aspects(string|array $aspects)

Register AOP aspects.

void
classMap(array $map)

Register class map overrides.

static void
replaceBootstrapProviderFile(string $path, string $content)

Replace the bootstrap provider file without exposing partial contents.

defaultProviders()

Get the default providers for a Hypervel application.

static void
flushState()

Flush all static state.

mixed
getSerializedPropertyValue(mixed $value, bool $withRelations = true)

Get the property value prepared for serialization.

mixed
getRestoredPropertyValue(mixed $value)

Get the restored property value after deserialization.

restoreCollection(ModelIdentifier $value)

Restore a queueable collection instance.

restoreModel(ModelIdentifier $value)

Restore the model from the model identifier instance.

getQueryForModelRestoration(Model $model, array|int|string $ids)

Get the query for model restoration.

void
configureSerializableClosureUses()

Configure serializable closure uses.

void
registerCallQueuedHandler()

Register the queued job handler.

void
registerLaravelInteropAliases()

Register class aliases for cross-framework queue interoperability.

void
registerManager()

Register the queue manager.

void
registerConnection()

Register the default queue connection binding.

void
registerConnectors(QueueManager $manager)

Register the connectors on the queue manager.

void
registerNullConnector(QueueManager $manager)

Register the Null queue connector.

void
registerSyncConnector(QueueManager $manager)

Register the Sync queue connector.

void
registerDeferredConnector(QueueManager $manager)

Register the Deferred queue connector.

void
registerBackgroundConnector(QueueManager $manager)

Register the Background queue connector.

void
registerFailoverConnector(QueueManager $manager)

Register the Failover queue connector.

void
registerDatabaseConnector(QueueManager $manager)

Register the database queue connector.

void
registerRedisConnector(QueueManager $manager)

Register the Redis queue connector.

void
registerBeanstalkdConnector(QueueManager $manager)

Register the Beanstalkd queue connector.

void
registerSqsConnector(QueueManager $manager)

Register the Amazon SQS queue connector.

void
registerWorker()

Register the queue worker.

void
registerListener()

Register the queue listener.

void
registerRoutes()

Register the default queue routes binding.

void
registerFailedJobServices()

Register the failed job services.

Details

in ServiceProvider at line 83
__construct(Application $app)

No description

Parameters

Application $app

in ServiceProvider at line 97
bool isEnabled()

Determine whether this provider should be registered and booted.

Hypervel-specific extension (not in Laravel). Override on a subclass to gate registration on runtime config / env / feature flags. When this returns false the provider is instantiated but neither register() nor boot() is called, its bindings/singletons properties are not processed, and it is not tracked in the application's provider list.

Return Value

bool

at line 54
void register()

Register the service provider.

Return Value

void

in ServiceProvider at line 112
void booting(Closure $callback)

Register a booting callback to be run before the "boot" method is called.

Parameters

Closure $callback

Return Value

void

in ServiceProvider at line 120
void booted(Closure $callback)

Register a booted callback to be run after the "boot" method is called.

Parameters

Closure $callback

Return Value

void

in ServiceProvider at line 128
void callBootingCallbacks()

Call the registered booting callbacks.

Return Value

void

in ServiceProvider at line 138
void callBootedCallbacks()

Call the registered booted callbacks.

Return Value

void

in ServiceProvider at line 153
protected void mergeConfigFrom(string $path, string $key)

Merge the given configuration with the existing configuration.

Top-level keys use shallow merge (app values override package defaults). Keys declared in mergeableOptions() get an additional one-level-deeper merge so the app can add entries to collection arrays (stores, connections, guards, etc.) without losing the package's default entries.

Parameters

string $path
string $key

Return Value

void

in ServiceProvider at line 196
protected array mergeableOptions(string $name)

Get configuration arrays whose entries should be merged by name.

Override this in a package service provider to list nested configuration arrays whose entries are named. Application entries replace package entries with the same name, while package entries not defined by the application remain. Nested arrays not listed here are replaced completely.

Parameters

string $name

Return Value

array

in ServiceProvider at line 204
protected void replaceConfigRecursivelyFrom(string $path, string $key)

Replace the given configuration with the existing configuration recursively.

Parameters

string $path
string $key

Return Value

void

in ServiceProvider at line 229
protected void loadRoutesFrom(string $path)

Load the given routes file if routes are not already cached.

Parameters

string $path

Return Value

void

in ServiceProvider at line 239
protected void loadViewsFrom(array|string $path, string $namespace)

Register a view file namespace.

Parameters

array|string $path
string $namespace

Return Value

void

in ServiceProvider at line 258
protected void loadViewComponentsAs(string $prefix, array $components)

Register the given view components with a custom prefix.

Parameters

string $prefix
array $components

Return Value

void

in ServiceProvider at line 274
protected void loadTranslationsFrom(string $path, string|null $namespace = null)

Register a translation file namespace.

Parameters

string $path
string|null $namespace

Return Value

void

in ServiceProvider at line 284
protected void loadJsonTranslationsFrom(string $path)

Register a JSON translation file path.

Parameters

string $path

Return Value

void

in ServiceProvider at line 294
protected void loadMigrationsFrom(array|string $paths)

Register database migration paths.

Parameters

array|string $paths

Return Value

void

in ServiceProvider at line 308
protected void callAfterResolving(string $name, Closure $callback)

Setup an after resolving listener, or fire immediately if already resolved.

Parameters

string $name
Closure $callback

Return Value

void

in ServiceProvider at line 320
protected void publishesMigrations(array $paths, mixed $groups = null)

Register migration paths to be published by the publish command.

Parameters

array $paths
mixed $groups

Return Value

void

in ServiceProvider at line 337
protected void publishes(array $paths, mixed $groups = null)

Register paths to be published by the publish command.

Parameters

array $paths
mixed $groups

Return Value

void

in ServiceProvider at line 351
protected void ensurePublishArrayInitialized(string $class)

Ensure the publish array for the service provider is initialized.

Parameters

string $class

Return Value

void

in ServiceProvider at line 361
protected void addPublishGroup(string $group, array $paths)

Add a publish group / tag to the service provider.

Parameters

string $group
array $paths

Return Value

void

in ServiceProvider at line 376
static array pathsToPublish(string|null $provider = null, string|null $group = null)

Get the paths to publish.

Parameters

string|null $provider
string|null $group

Return Value

array

in ServiceProvider at line 393
static protected array|null pathsForProviderOrGroup(string|null $provider, string|null $group)

Get the paths for the provider or group (or both).

Returns null when no filter is specified, allowing caller to fall back to all paths. Returns empty array when a filter is specified but not found.

Parameters

string|null $provider
string|null $group

Return Value

array|null

in ServiceProvider at line 413
static protected array pathsForProviderAndGroup(string $provider, string $group)

Get the paths for the provider and group.

Parameters

string $provider
string $group

Return Value

array

in ServiceProvider at line 425
static array publishableProviders()

Get the service providers available for publishing.

Return Value

array

in ServiceProvider at line 433
static array publishableMigrationPaths()

Get the migration paths available for publishing.

Return Value

array

in ServiceProvider at line 441
static array publishableGroups()

Get the groups available for publishing.

Return Value

array

in ServiceProvider at line 449
static bool addProviderToBootstrapFile(string $provider, string|null $path = null)

Add a provider to the bootstrap provider configuration file.

Parameters

string $provider
string|null $path

Return Value

bool

in ServiceProvider at line 487
static bool removeProviderFromBootstrapFile(string|array $providersToRemove, string|null $path = null, bool $strict = false)

Remove a provider from the bootstrap provider file.

Parameters

string|array $providersToRemove
string|null $path
bool $strict

Return Value

bool

in ServiceProvider at line 529
protected void optimizes(string|null $optimize = null, string|null $clear = null, string|null $key = null)

Register commands that should run on "optimize".

Parameters

string|null $optimize
string|null $clear
string|null $key

Return Value

void

in ServiceProvider at line 545
protected void reloads(string $reload, string|null $key = null)

Register commands that should run on "reload".

Parameters

string $reload
string|null $key

Return Value

void

in ServiceProvider at line 555
protected string getProviderKey(string|null $key = null)

Get a short descriptive key for the current service provider.

Parameters

string|null $key

Return Value

string

in ServiceProvider at line 574
void commands(array $commands)

Register the package's custom Artisan commands.

Parameters

array $commands

Return Value

void

in ServiceProvider at line 590
protected void aspects(string|array $aspects)

Register AOP aspects.

Reads $classes and $priority from each aspect class's default property values via reflection (without instantiating the aspect). Must be called during register(), before boot().

Parameters

string|array $aspects

Return Value

void

in ServiceProvider at line 622
protected void classMap(array $map)

Register class map overrides.

Applies entries to the Composer autoloader immediately. Fails hard if any target class is already loaded. Must be called during register(), before the target class is autoloaded.

Parameters

array $map

originalClass => replacementFilePath

Return Value

void

in ServiceProvider at line 630
static protected void replaceBootstrapProviderFile(string $path, string $content)

Replace the bootstrap provider file without exposing partial contents.

Parameters

string $path
string $content

Return Value

void

in ServiceProvider at line 652
static DefaultProviders defaultProviders()

Get the default providers for a Hypervel application.

Return Value

DefaultProviders

in ServiceProvider at line 660
static void flushState()

Flush all static state.

Return Value

void

protected mixed getSerializedPropertyValue(mixed $value, bool $withRelations = true)

Get the property value prepared for serialization.

Parameters

mixed $value
bool $withRelations

Return Value

mixed

protected mixed getRestoredPropertyValue(mixed $value)

Get the restored property value after deserialization.

Parameters

mixed $value

Return Value

mixed

protected Collection restoreCollection(ModelIdentifier $value)

Restore a queueable collection instance.

Parameters

ModelIdentifier $value

Return Value

Collection

Model restoreModel(ModelIdentifier $value)

Restore the model from the model identifier instance.

Parameters

ModelIdentifier $value

Return Value

Model

protected Builder getQueryForModelRestoration(Model $model, array|int|string $ids)

Get the query for model restoration.

Parameters

Model $model
array|int|string $ids

Return Value

Builder

at line 92
protected void configureSerializableClosureUses()

Configure serializable closure uses.

Return Value

void

at line 114
protected void registerCallQueuedHandler()

Register the queued job handler.

Return Value

void

at line 128
protected void registerLaravelInteropAliases()

Register class aliases for cross-framework queue interoperability.

These aliases allow Hypervel workers to process jobs dispatched by Laravel and vice versa. The payload's "job" field references Illuminate\Queue\CallQueuedHandler, and serialized models use Illuminate\Contracts\Database\ModelIdentifier. Without these aliases, Hypervel cannot resolve those classes from Laravel-dispatched job payloads.

Return Value

void

at line 142
protected void registerManager()

Register the queue manager.

Return Value

void

at line 171
protected void registerConnection()

Register the default queue connection binding.

Return Value

void

at line 179
void registerConnectors(QueueManager $manager)

Register the connectors on the queue manager.

Parameters

QueueManager $manager

Return Value

void

at line 189
protected void registerNullConnector(QueueManager $manager)

Register the Null queue connector.

Parameters

QueueManager $manager

Return Value

void

at line 197
protected void registerSyncConnector(QueueManager $manager)

Register the Sync queue connector.

Parameters

QueueManager $manager

Return Value

void

at line 205
protected void registerDeferredConnector(QueueManager $manager)

Register the Deferred queue connector.

Parameters

QueueManager $manager

Return Value

void

at line 213
protected void registerBackgroundConnector(QueueManager $manager)

Register the Background queue connector.

Parameters

QueueManager $manager

Return Value

void

at line 221
protected void registerFailoverConnector(QueueManager $manager)

Register the Failover queue connector.

Parameters

QueueManager $manager

Return Value

void

at line 232
protected void registerDatabaseConnector(QueueManager $manager)

Register the database queue connector.

Parameters

QueueManager $manager

Return Value

void

at line 245
protected void registerRedisConnector(QueueManager $manager)

Register the Redis queue connector.

Parameters

QueueManager $manager

Return Value

void

at line 258
protected void registerBeanstalkdConnector(QueueManager $manager)

Register the Beanstalkd queue connector.

Parameters

QueueManager $manager

Return Value

void

at line 266
protected void registerSqsConnector(QueueManager $manager)

Register the Amazon SQS queue connector.

Parameters

QueueManager $manager

Return Value

void

at line 274
protected void registerWorker()

Register the queue worker.

Return Value

void

at line 289
protected void registerListener()

Register the queue listener.

Return Value

void

at line 297
protected void registerRoutes()

Register the default queue routes binding.

Return Value

void

at line 305
protected void registerFailedJobServices()

Register the failed job services.

Return Value

void