Documentation

QueueController extends AbstractController
in package

Console queue controller class

Tags
category

Pop\Kettle

author

Nick Sagona, III nick@popphp.org

copyright

Copyright (c) 2009-2026 Nick Sagona, III

license

https://www.popphp.org/license New BSD License

version
3.0.0

Table of Contents

Properties

$application  : Application|null
Application object
$bypassMaintenance  : bool
Bypass maintenance false
$console  : Console|null
Console object
$defaultAction  : string
Default action
$maintenanceAction  : string
Maintenance action

Methods

__construct()  : mixed
Constructor for the controller
application()  : Application
Get application object
bypassMaintenance()  : bool
Check the bypass maintenance check
clear()  : void
Clear command
config()  : void
Config command
console()  : Console
Get request object
dispatch()  : void
Dispatch the controller based on the action
dispatchMaintenance()  : void
Dispatch the maintenance action
error()  : void
Default error action method
getApplication()  : Application|null
Get application object
getConsole()  : Console|null
Get console object
getDefaultAction()  : string
Get the default action
getMaintenanceAction()  : string
Get the maintenance action
hasApplication()  : bool
Has application object
hasConsole()  : bool
Has console object
jobs()  : void
Jobs command
scheduler()  : void
Scheduler command
setApplication()  : static
Set application object
setBypassMaintenance()  : static
Check the bypass maintenance check
setConsole()  : static
Set console object
setDefaultAction()  : static
Set the default action
setMaintenanceAction()  : static
Set the maintenance action
tasks()  : void
Tasks command
work()  : void
Work command
resolveApp()  : Application|null
Resolve the consuming application's own Application instance, printing a friendly error and returning null if nothing is scaffolded
worker()  : Worker|null
Resolve the app and build a worker for $queue, printing a friendly error and returning null on failure

Properties

$bypassMaintenance

Bypass maintenance false

protected bool $bypassMaintenance = true

$maintenanceAction

Maintenance action

protected string $maintenanceAction = 'maintenance'

Methods

bypassMaintenance()

Check the bypass maintenance check

public bypassMaintenance() : bool
Return values
bool

clear()

Clear command

public clear([string|null $queue = 'default' ][, array<string|int, mixed> $options = [] ]) : void
Parameters
$queue : string|null = 'default'
$options : array<string|int, mixed> = []

config()

Config command

public config([string|null $queue = 'default' ]) : void
Parameters
$queue : string|null = 'default'

dispatch()

Dispatch the controller based on the action

public dispatch([string|null $action = null ][, array<string|int, mixed>|null $params = null ]) : void
Parameters
$action : string|null = null
$params : array<string|int, mixed>|null = null
Tags
throws
Exception

getDefaultAction()

Get the default action

public getDefaultAction() : string
Return values
string

getMaintenanceAction()

Get the maintenance action

public getMaintenanceAction() : string
Return values
string

hasApplication()

Has application object

public hasApplication() : bool
Return values
bool

hasConsole()

Has console object

public hasConsole() : bool
Return values
bool

jobs()

Jobs command

public jobs([string|null $queue = 'default' ]) : void
Parameters
$queue : string|null = 'default'

scheduler()

Scheduler command

public scheduler([string|null $queue = 'default' ][, array<string|int, mixed> $options = [] ]) : void
Parameters
$queue : string|null = 'default'
$options : array<string|int, mixed> = []

setBypassMaintenance()

Check the bypass maintenance check

public setBypassMaintenance([bool $bypass = true ]) : static
Parameters
$bypass : bool = true
Return values
static

setConsole()

Set console object

public setConsole([Console $console = new Console(120) ]) : static
Parameters
$console : Console = new Console(120)
Return values
static

setDefaultAction()

Set the default action

public setDefaultAction(string $default) : static
Parameters
$default : string
Return values
static

setMaintenanceAction()

Set the maintenance action

public setMaintenanceAction(string $maintenance) : static
Parameters
$maintenance : string
Return values
static

tasks()

Tasks command

public tasks([string|null $queue = 'default' ]) : void
Parameters
$queue : string|null = 'default'

work()

Work command

public work([string|null $queue = 'default' ][, array<string|int, mixed> $options = [] ]) : void
Parameters
$queue : string|null = 'default'
$options : array<string|int, mixed> = []

resolveApp()

Resolve the consuming application's own Application instance, printing a friendly error and returning null if nothing is scaffolded

protected resolveApp() : Application|null
Return values
Application|null

worker()

Resolve the app and build a worker for $queue, printing a friendly error and returning null on failure

protected worker(string $queue) : Worker|null
Parameters
$queue : string
Return values
Worker|null

        
On this page

Search results