Class FileCom

Description

The Flat File Communication Class

it extends the ComBasic Class and Implement it's Abstract Methods

Located in /Com/FileCom.php (line 27)

ComBasic
   |
   --FileCom
Variable Summary
Method Summary
 FileCom FileCom ([string $uname = ""])
 void Clear ()
 void Delete (string $name)
 boolean Exist (string $name)
 string Get (string $name)
 unknown GetAll ()
 string Gget (string $name)
 void Gset (string $name, string $value)
 void Init ()
 void Set (string $name, string $value)
Variables
SimpleMutex $MuxH (line 41)

an Instance of the Sync Class

  • todo: Add an abstract Sync Class of which type the var will be
  • access: public
PlainArrayHandler $RecHandler (line 48)

an Instance of the Writting Methodology Class

  • todo: Add an abstract writting Class of which type the var will be
  • access: public
string $UniqueName = "MyFile" (line 34)

The Flat File Name

  • access: public
Methods
Constructor FileCom (line 63)

The Flat File Communication Class Constructor

This class is called in two manners :- 1) Intializing Communication from parent thread here it's called like : $asd=new FileCom() and File Name can be changed latter BUT before Init is called by Process (which has no effect but JUST changing the name)

2) From a called thread to start Communication with other threads ( in same process ) :$asd=new FileCom($uname) where $uname is the Communication file name which must be passed from mother thread to called threads

FileCom FileCom ([string $uname = ""])
  • string $uname
Clear (line 184)

Flat File Communication Specific Clearing Function

it removes communication files to clear any used space

void Clear ()

Redefinition of:
ComBasic::Clear()
This is a void function with no arguments
Delete (line 164)

This is a class Spacefic Deleting function it writes to the file the Values returned from Writting Methodolgy class Deleting function

void Delete (string $name)
  • string $name
Exist (line 108)

Flat File Communication Specific Exisctance Checking Function

This function uses the Writting Methodolgy Class to do the Job directly (NO Sync. bounds)

boolean Exist (string $name)
  • string $name

Redefinition of:
ComBasic::Exist()
Value returning function with arguments
Get (line 132)

Flat File Communication Specific Getting Function

This function Encapsulates Getting values through Chosen Sync Class

  • return: the value of Communication Varaible $name (if it exists) or null if not
string Get (string $name)
  • string $name

Redefinition of:
ComBasic::Get()
Value returning function with arguments
GetAll (line 174)

This function is specific to PlainArray Writting class it returns all contents , here it reads all file and returns it

unknown GetAll ()
Gget (line 154)

This is the Value Getting function it wrraps the Writting Methodolgy Class Getting function

  • return: the value of Communication Varaible $name (if it exists) or null if not
string Gget (string $name)
  • string $name
Gset (line 143)

This is the Class Specific Setting function it writes to the file the Values returned from Writting Methodolgy class Setting function

void Gset (string $name, string $value)
  • string $name
  • string $value
Init (line 82)

Flat File Communication Specific Init Function

(For pupose of this function review ComBasic abstract class documentation)

For the FileCom class the role of this function is to create the file to be ready for using it checks for the existance of a file with the same name and keeps looping to find an idle one

void Init ()

Redefinition of:
ComBasic::Init()
This is a void function with no arguments
Set (line 120)

Flat File Communication Specific Setting Function

This function Encapsulates Setting values through Chosen Sync Class

void Set (string $name, string $value)
  • string $name
  • string $value

Redefinition of:
ComBasic::Set()
void function with arguments

Inherited Methods

Inherited From ComBasic

 ComBasic::Clear()
 ComBasic::Exist()
 ComBasic::Get()
 ComBasic::Init()
 ComBasic::Set()

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