Hazaar\Warlock
Service
Abstract
The Warlock application service class

Services are long running processes that allow code to be executed on the server in the background without affecting or requiring any interaction with the front-end. Services are managed by the Warlock process and can be set to start when Warlock starts or enabled/disabled manually using the Hazaar\Warlock\Control class.

Services are executed within the Application context and therefore have access to everything (configs, classes/models, cache, etc) that your application front-end does.

See the "Services Documentation":http://www.hazaarmvc.com/docs/advanced-features/warlock/services for information on how to write and manage services.

Extends
\Process
Summary
MethodsPropertiesConstants
No constants
Properties
$config
$config
$name
$name
$next
$next
$ob_file
$ob_file
$schedule
$schedule
$slept
$slept
$state
$state
Methods
__construct()
__construct($application, $protocol)
__errorHandler()
__errorHandler($errno, $errstr, $errfile = null, $errline = null, $errcontext = Array ( ) )
__exceptionHandler()
__exceptionHandler($e)
__processCommand()
__processCommand($command, $payload = null)
__processSchedule()
__processSchedule()
__sendHeartbeat()
__sendHeartbeat()
__stateString()
__stateString($state = null)
cancel()
cancel($id)
cron()
cron($format, $callback, $params = Array ( ) )
delay()
delay($seconds, $callback, $params = Array ( ) )
interval()
interval($seconds, $callback, $params = Array ( ) )
main()
main($params = Array ( ) )
redirectOutput()
redirectOutput($name)
This method turns off output to STDOUT and STDERR and redirects them to a file.
restart()
restart()
run()
run()
schedule()
schedule($date, $callback, $params = Array ( ) )
send()
send($command, $payload = null)
shutdown()
shutdown()
signal()
signal($event_id, $data)
sleep()
sleep($timeout = 0)
Sleep for a number of seconds. If data is received during the sleep it is processed. If the timeout is greater

than zero and data is received, the remaining timeout amount will be used in subsequent selects to ensure the full sleep period is used. If the timeout parameter is not set then the loop will just dump out after one execution.

start()
start($params = Array ( ) )
state()
state()
stop()
stop()
writeOutput()
writeOutput($buffer)
Powered by Scroly.io Generated: Thursday, October 3rd 2019 at 2:45pm