Class CliThread

Description

Cli Thread Calling Class

This Class uses OS Specific calls to launch a Separate PHP/Cli Process to execute Thread Sure it's heavier that other Ways but Supports both PHP/Cli and PHP as part of web server (in any way CGI , Module ..etc )

IMPORTANT NOTE : in order for this class to work :- On Windows : The *.php class must be tied to your php.exe On *nix : The Script must be executable by adding Execution path on top of top

Located in /Thread/CliThreader.php (line 26)

CallerBasic
   |
   --CliThread
Variable Summary
 string $params
Method Summary
 CliThread __construct (string $url, string $params, Process $MothProcess)
 void Go ([int $Method = 1])
 Boolean IsWindows ()
 void SetParams (string $Npr)
Variables
string $params (line 39)

Parameters to be passed

  • access: public

Inherited Variables

Inherited from CallerBasic

CallerBasic::$pos
Methods
Constructor __construct (line 48)

Cli-Thread Class Constuctor Just Pick Arguments and tidy them

CliThread __construct (string $url, string $params, Process $MothProcess)
  • string $url
  • string $params
  • Process $MothProcess

Redefinition of:
CallerBasic::__construct()
CallerBasic Constructor , it must be explicily called from clasese extending it (PHP OOP issue)
Go (line 73)

Cli-Thread Calling Specific Launching Function

Launch Threads and them thier arguments in OS dependent manner

void Go ([int $Method = 1])
  • int $Method: has effect on Windows only whether to use Shell Scirpt or Pipes

Redefinition of:
CallerBasic::Go()
This is a void function with no arguments
IsWindows (line 113)

Detect Using Windows

Boolean IsWindows ()
SetParams (line 104)

Cli-Thread Calling Specific Parameters Setting Function

Direct Setting of Thread Params

Note : The format of Parameters here is like Cli Programs arguments passing e.g. "asd qwe rty" Can be Percived at Called Threads as $argv[1]="asd" , $argv[1]="qwe" , $argv[1]="rty"

void SetParams (string $Npr)
  • string $Npr

Redefinition of:
CallerBasic::SetParams()
A void function with one argument

Inherited Methods

Inherited From CallerBasic

 CallerBasic::__construct()
 CallerBasic::Get()
 CallerBasic::GetID()
 CallerBasic::GetState()
 CallerBasic::Go()
 CallerBasic::Join()
 CallerBasic::Set()
 CallerBasic::SetParams()

Documentation generated on Fri, 01 Aug 2008 05:54:10 +0300 by phpDocumentor 1.4.1