PHP Class MGDigital\BusQue\BusQue

Show file Open project: mgdigital/busque

Public Methods

Method Description
__construct ( Implementation $implementation )
deleteQueue ( string $queueName )
generateCommandId ( $command ) : string
getCommand ( string $queueName, string $id )
getQueueName ( $command ) : string
getQueuedCount ( string $queueName ) : integer
isIdInProgress ( string $queueName, string $id ) : boolean
isIdQueued ( string $queueName, string $id ) : boolean
listInProgressIds ( string $queueName ) : array
listQueuedIds ( string $queueName, integer $offset, integer $limit = 10 ) : array
listQueues ( ) : array
purgeCommand ( string $queueName, string $commandId )
queueCommand ( $command, string $commandId = null )
scheduleCommand ( $command, DateTimeInterface $dateTime, string $commandId = null )
serializeCommand ( $command ) : string
unserializeCommand ( string $serialized )
workQueue ( string $queueName, integer $n = null, integer $time = null )
workSchedule ( integer $n = null, integer $time = null )

Method Details

__construct() public method

public __construct ( Implementation $implementation )
$implementation Implementation

deleteQueue() public method

public deleteQueue ( string $queueName )
$queueName string

generateCommandId() public method

public generateCommandId ( $command ) : string
return string

getCommand() public method

public getCommand ( string $queueName, string $id )
$queueName string
$id string

getQueueName() public method

public getQueueName ( $command ) : string
return string

getQueuedCount() public method

public getQueuedCount ( string $queueName ) : integer
$queueName string
return integer

isIdInProgress() public method

public isIdInProgress ( string $queueName, string $id ) : boolean
$queueName string
$id string
return boolean

isIdQueued() public method

public isIdQueued ( string $queueName, string $id ) : boolean
$queueName string
$id string
return boolean

listInProgressIds() public method

public listInProgressIds ( string $queueName ) : array
$queueName string
return array

listQueuedIds() public method

public listQueuedIds ( string $queueName, integer $offset, integer $limit = 10 ) : array
$queueName string
$offset integer
$limit integer
return array

listQueues() public method

public listQueues ( ) : array
return array

purgeCommand() public method

public purgeCommand ( string $queueName, string $commandId )
$queueName string
$commandId string

queueCommand() public method

public queueCommand ( $command, string $commandId = null )
$commandId string

scheduleCommand() public method

public scheduleCommand ( $command, DateTimeInterface $dateTime, string $commandId = null )
$dateTime DateTimeInterface
$commandId string

serializeCommand() public method

public serializeCommand ( $command ) : string
return string

unserializeCommand() public method

public unserializeCommand ( string $serialized )
$serialized string

workQueue() public method

public workQueue ( string $queueName, integer $n = null, integer $time = null )
$queueName string
$n integer
$time integer

workSchedule() public method

public workSchedule ( integer $n = null, integer $time = null )
$n integer
$time integer