This object is used to deal with objects instead of arrays

package OWR
uses extends the singleton pattern
used_by \OWR\CLI\Controller

 Methods

Cloning is denied This function can NOT be overloaded

__clone() 
Inherited
access public
author Pierre-Alain Mignot
inherited_from \OWR\Singleton::__clone()

Executed when an object is unserialized We register the new object

__wakeUp() 
Inherited
access public
author Pierre-Alain Mignot
inherited_from \OWR\Singleton::__wakeUp()

Adds a command to the queue Executes immediatly the command if any slot left

add(array $args, int $priority) 
access public
author Pierre-Alain Mignot

Parameters

$args

array

the arguments (do, id, etc..)

$priority

int

priority level, from 1 to 3

Tries to execute a command

exec() 
access public
author Pierre-Alain Mignot

Returns the number of threads in queue

getQueueCount() : int
access public
author Pierre-Alain Mignot

Returns

intthreads count

Instance getter This function can NOT be overloaded

iGet() : mixed
InheritedStatic
access public
static
author Pierre-Alain Mignot
inherited_from \OWR\Singleton::iGet()

Returns

mixedthe instance

Register function This function is called when an object is unserialized and is used to register the instance of the object This function can NOT be overloaded

register(mixed $instance) 
InheritedStatic
access public
static
author Pierre-Alain Mignot
inherited_from \OWR\Singleton::register()

Parameters

$instance

mixed

the instance to register

Constructor

__construct() 
access protected
author Pierre-Alain Mignot

Executes the command

_exec() : boolean
access protected
author Pierre-Alain Mignot

Returns

booleantrue on success

Returns the number of threads that we have already launched

_getProcessCount() : int
access public
author Pierre-Alain Mignot

Returns

intnumber of php threads for us

 Properties

 

the path to PHP executable and to cli.php

$_cmd : string
access protected
 

maximum threads to launch simultaneously

$_max : int
access protected
 

instance of \SplPriorityQueue

$_queue : mixed
access protected
 

store instancied objects

$_instances : array
Inherited
access private
static
inherited_from \OWR\Singleton::$$_instances