Stud.IP  5.4
 All Data Structures Namespaces Files Functions Variables Groups
FileLock Class Reference

Public Member Functions

 __construct ($id)
 
 tryLock (&$data=[])
 
 release ()
 

Protected Attributes

 $file
 

Constructor & Destructor Documentation

__construct (   $id)

Constructs a new lock object with the provided id.

Parameters
String$idIdentifier of the lock

Member Function Documentation

release ( )

Releases a previously obtained lock

Returns
boolean true on success or false on failure
tryLock ( $data = [])

Try to aquire a file lock. The provided lock information will be stored with the lock. If the lock cannot be aquired, the lock information in $data is updated from the lock file.

Parameters
array$dataadditional data to be stored with the lock
Returns
boolean true on success or false on failure

Field Documentation

$file
protected

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