PHP Class Bravo3\Orm\Drivers\Common\UnitOfWork

Datei anzeigen Open project: bravo3/orm Class Usage Examples

Protected Properties

Property Type Description
$commands Command[]

Public Methods

Method Description
__construct ( )
addCommand ( string $name, array $arguments = [] ) Create a new command and add it to the queue
getCommands ( ) : Command[] Get all commands on the queue
getQueueSize ( ) : integer Returns the number of commands in the queue
getWork ( ) : Command | null Get the next command and remove it from the queue
purge ( ) Purge the command queue
queueCommand ( Command $command ) Add a command to the queue

Method Details

__construct() public method

public __construct ( )

addCommand() public method

Create a new command and add it to the queue
public addCommand ( string $name, array $arguments = [] )
$name string
$arguments array

getCommands() public method

Get all commands on the queue
public getCommands ( ) : Command[]
return Command[]

getQueueSize() public method

Returns the number of commands in the queue
public getQueueSize ( ) : integer
return integer

getWork() public method

Get the next command and remove it from the queue
public getWork ( ) : Command | null
return Command | null

purge() public method

Purge the command queue
public purge ( )

queueCommand() public method

Add a command to the queue
public queueCommand ( Command $command )
$command Command

Property Details

$commands protected_oe property

protected Command[],Bravo3\Orm\Drivers\Common $commands
return Command[]