LockFile
in package
Table of Contents
- $file_name : mixed
- $max_lock_file_age : mixed
- $use_pid : mixed
- __construct() : mixed
- LockFile constructor.
- create() : bool|int
- delete() : bool
- exists() : bool|null
- getCurrentPID() : bool|int
- getFileName() : null
- isPIDRunning() : bool|null
- readPIDFile() : false|int
- setFileName() : bool
Properties
$file_name
public
mixed
$file_name
= \null
$max_lock_file_age
public
mixed
$max_lock_file_age
= 86400
$use_pid
public
mixed
$use_pid
= \true
Methods
__construct()
LockFile constructor.
public
__construct( $file_name) : mixed
Parameters
Return values
mixed —create()
public
create([mixed $initialize = false ]) : bool|int
Parameters
- $initialize : mixed = false
Return values
bool|int —delete()
public
delete([mixed $check_own_pid = true ]) : bool
Parameters
- $check_own_pid : mixed = true
Return values
bool —exists()
public
exists() : bool|null
Return values
bool|null —getCurrentPID()
public
getCurrentPID() : bool|int
Return values
bool|int —getFileName()
public
getFileName() : null
Return values
null —isPIDRunning()
public
isPIDRunning(int|string $pid) : bool|null
Parameters
- $pid : int|string
-
Process ID
Return values
bool|null —readPIDFile()
public
readPIDFile( $file_name) : false|int
Parameters
Return values
false|int —setFileName()
public
setFileName( $file_name) : bool