TITAN Library for PHP5  5.1.0
Web Software Development Kit for PHP5
lock Class Reference

Titan Lock Class. More...

Public Member Functions

 __construct ($name, $path= '/tmp/')
 
 locked ()
 
 lock ()
 
 unlock ()
 

Data Fields

 $path = '/tmp/'
 Path in which to store lock file.
 
 $expire_delete = 'Y'
 Should the lock file and session be deleted when it expires?
 
 $expire_time = '+1 hour'
 When does the lock session expire, relative to it's access_time.
 
 $notify_interval = ''
 How often should expired but undeleted lock sessions notify?
 
 $notify_email = ''
 Who should expired but undeleted lock sessions notify?
 
 $error = ''
 Error message, if any.
 
 $is_locked = false
 Lock status.
 
 $wait_maximum = 10000000
 Maximum time to wait for an unlock (in microseconds) default: 10 seconds.
 
 $wait_interval = 500000
 Time to wait before trying again (in microseconds) default: .5 second.
 

Protected Attributes

 $name
 Name of lock file.
 

Detailed Description

Titan Lock Class.

Class: \tl\data\lock

Author
James E. Bush work@.nosp@m.bush.nosp@m..cc
Version
5.1.0

Constructor & Destructor Documentation

__construct (   $name,
  $path = '/tmp/' 
)

Constructor

Parameters
string$nameName of the lock (Must be unique within the path!)
string$pathPath location to store the lock file
Returns
lock The lock manipulation object

Member Function Documentation

locked ( )

Is the lock locked?

Returns
boolean Is the lock locked?
lock ( )

Lock the file

unlock ( )

Unlock the file


The documentation for this class was generated from the following file: