QueueServiceProvider
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
Determine whether this provider should be registered and booted.
Register the service provider.
Register a booting callback to be run before the "boot" method is called.
Merge the given configuration with the existing configuration.
Get configuration arrays whose entries should be merged by name.
Replace the given configuration with the existing configuration recursively.
Load the given routes file if routes are not already cached.
Register a view file namespace.
Register the given view components with a custom prefix.
Register a translation file namespace.
Register a JSON translation file path.
Register database migration paths.
Setup an after resolving listener, or fire immediately if already resolved.
Register migration paths to be published by the publish command.
Register paths to be published by the publish command.
Ensure the publish array for the service provider is initialized.
Add a publish group / tag to the service provider.
Get the paths to publish.
Get the paths for the provider or group (or both).
Get the paths for the provider and group.
Get the service providers available for publishing.
Get the migration paths available for publishing.
Add a provider to the bootstrap provider configuration file.
Remove a provider from the bootstrap provider file.
Register commands that should run on "optimize".
Register commands that should run on "reload".
Get a short descriptive key for the current service provider.
Replace the bootstrap provider file without exposing partial contents.
Get the default providers for a Hypervel application.
Get the container used to resolve connector dependencies.
Get the exception reporter for in-process queue connections.
Get the property value prepared for serialization.
Get the restored property value after deserialization.
Get the query for model restoration.
Configure serializable closure uses.
Register the queued job handler.
Register class aliases for cross-framework queue interoperability.
Register the queue manager.
Register the default queue connection binding.
Register the queue worker.
Register the queue listener.
Register the default queue routes binding.
Register the failed job services.
Details
in
ServiceProvider at line 84
__construct(Application $app)
Create a new service provider instance.
in
ServiceProvider at line 98
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.
at line 47
void
register()
Register the service provider.
in
ServiceProvider at line 113
void
booting(Closure $callback)
Register a booting callback to be run before the "boot" method is called.
in
ServiceProvider at line 121
void
booted(Closure $callback)
Register a booted callback to be run after the "boot" method is called.
in
ServiceProvider at line 129
void
callBootingCallbacks()
Call the registered booting callbacks.
in
ServiceProvider at line 139
void
callBootedCallbacks()
Call the registered booted callbacks.
in
ServiceProvider at line 154
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.
in
ServiceProvider at line 197
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.
in
ServiceProvider at line 205
protected void
replaceConfigRecursivelyFrom(string $path, string $key)
Replace the given configuration with the existing configuration recursively.
in
ServiceProvider at line 230
protected void
loadRoutesFrom(string $path)
Load the given routes file if routes are not already cached.
in
ServiceProvider at line 240
protected void
loadViewsFrom(array|string $path, string $namespace)
Register a view file namespace.
in
ServiceProvider at line 258
protected void
loadViewComponentsAs(string $prefix, array $components)
Register the given view components with a custom prefix.
in
ServiceProvider at line 274
protected void
loadTranslationsFrom(string $path, string|null $namespace = null)
Register a translation file namespace.
in
ServiceProvider at line 284
protected void
loadJsonTranslationsFrom(string $path)
Register a JSON translation file path.
in
ServiceProvider at line 294
protected void
loadMigrationsFrom(array|string $paths)
Register database migration paths.
in
ServiceProvider at line 308
protected void
callAfterResolving(string $name, Closure $callback)
Setup an after resolving listener, or fire immediately if already resolved.
in
ServiceProvider at line 320
protected void
publishesMigrations(array $paths, mixed $groups = null)
Register migration paths to be published by the publish command.
in
ServiceProvider at line 337
protected void
publishes(array $paths, mixed $groups = null)
Register paths to be published by the publish command.
in
ServiceProvider at line 351
protected void
ensurePublishArrayInitialized(string $class)
Ensure the publish array for the service provider is initialized.
in
ServiceProvider at line 361
protected void
addPublishGroup(string $group, array $paths)
Add a publish group / tag to the service provider.
in
ServiceProvider at line 376
static array
pathsToPublish(string|null $provider = null, string|null $group = null)
Get the paths to publish.
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.
in
ServiceProvider at line 413
static protected array
pathsForProviderAndGroup(string $provider, string $group)
Get the paths for the provider and group.
in
ServiceProvider at line 425
static array
publishableProviders()
Get the service providers available for publishing.
in
ServiceProvider at line 433
static array
publishableMigrationPaths()
Get the migration paths available for publishing.
in
ServiceProvider at line 441
static array
publishableGroups()
Get the groups available for publishing.
in
ServiceProvider at line 449
static bool
addProviderToBootstrapFile(string $provider, string|null $path = null)
Add a provider to the bootstrap provider configuration file.
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.
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".
in
ServiceProvider at line 545
protected void
reloads(string $reload, string|null $key = null)
Register commands that should run on "reload".
in
ServiceProvider at line 555
protected string
getProviderKey(string|null $key = null)
Get a short descriptive key for the current service provider.
in
ServiceProvider at line 575
void
commands(array $commands)
Register the package's custom Artisan commands.
in
ServiceProvider at line 591
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().
in
ServiceProvider at line 623
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.
in
ServiceProvider at line 631
static protected void
replaceBootstrapProviderFile(string $path, string $content)
Replace the bootstrap provider file without exposing partial contents.
in
ServiceProvider at line 653
static DefaultProviders
defaultProviders()
Get the default providers for a Hypervel application.
in
ServiceProvider at line 661
static void
flushState()
Flush all static state.
at line 186
protected Container
connectorContainer()
Get the container used to resolve connector dependencies.
in
RegistersQueueConnectors at line 35
protected void
registerDefaultConnectors(QueueManager $manager)
Register the connectors on the queue manager.
in
RegistersQueueConnectors at line 45
protected Closure|null
exceptionReporter()
Get the exception reporter for in-process queue connections.
in
RegistersQueueConnectors at line 57
protected void
registerNullConnector(QueueManager $manager)
Register the Null queue connector.
in
RegistersQueueConnectors at line 65
protected void
registerSyncConnector(QueueManager $manager)
Register the Sync queue connector.
in
RegistersQueueConnectors at line 73
protected void
registerDeferredConnector(QueueManager $manager)
Register the Deferred queue connector.
in
RegistersQueueConnectors at line 81
protected void
registerBackgroundConnector(QueueManager $manager)
Register the Background queue connector.
in
RegistersQueueConnectors at line 89
protected void
registerFailoverConnector(QueueManager $manager)
Register the Failover queue connector.
in
RegistersQueueConnectors at line 100
protected void
registerDatabaseConnector(QueueManager $manager)
Register the database queue connector.
in
RegistersQueueConnectors at line 113
protected void
registerRedisConnector(QueueManager $manager)
Register the Redis queue connector.
in
RegistersQueueConnectors at line 126
protected void
registerBeanstalkdConnector(QueueManager $manager)
Register the Beanstalkd queue connector.
in
RegistersQueueConnectors at line 134
protected void
registerSqsConnector(QueueManager $manager)
Register the Amazon SQS queue connector.
in
SerializesAndRestoresModelIdentifiers at line 21
protected mixed
getSerializedPropertyValue(mixed $value, bool $withRelations = true)
Get the property value prepared for serialization.
in
SerializesAndRestoresModelIdentifiers at line 64
protected mixed
getRestoredPropertyValue(mixed $value)
Get the restored property value after deserialization.
in
SerializesAndRestoresModelIdentifiers at line 78
protected Collection
restoreCollection(ModelIdentifier $value)
Restore a queueable collection instance.
in
SerializesAndRestoresModelIdentifiers at line 118
Model
restoreModel(ModelIdentifier $value)
Restore the model from the model identifier instance.
in
SerializesAndRestoresModelIdentifiers at line 137
protected Builder
getQueryForModelRestoration(Model $model, array|int|string $ids)
Get the query for model restoration.
at line 85
void
boot(CacheManager $cache, Repository $config)
Bootstrap the service provider.
at line 104
protected void
configureSerializableClosureUses()
Configure serializable closure uses.
at line 126
protected void
registerCallQueuedHandler()
Register the queued job handler.
at line 141
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.
at line 155
protected void
registerManager()
Register the queue manager.
at line 167
protected void
registerConnection()
Register the default queue connection binding.
at line 178
void
registerConnectors(QueueManager $manager)
Register the connectors on the queue manager.
Boot-only. Connectors persist on the supplied manager for the worker lifetime and affect every subsequent connection it resolves.
at line 194
protected void
registerWorker()
Register the queue worker.
at line 209
protected void
registerListener()
Register the queue listener.
at line 217
protected void
registerRoutes()
Register the default queue routes binding.
at line 225
protected void
registerFailedJobServices()
Register the failed job services.