ProgressBar
in package
Table of Contents
- $default_key : mixed
- $update_interval : mixed
- $update_iteration : mixed
- $last_data : mixed
- $obj : mixed
- $key_prefix : mixed
- $last_update_time : mixed
- __construct() : mixed
- ProgressBar constructor.
- calculateRemainingTime() : mixed
- delete() : bool
- error() : bool
- get() : bool
- getDefaultKey() : null
- getLastData() : array<string|int, mixed>|null
- getSharedMemoryObject() : false|SharedMemory|null
- Lazy load the SharedMemory object because if its using REDIS it would make a connection immediately rather than when its actually needed.
- set() : bool
- setDefaultKey() : mixed
- Allow setting a default key so we don't have to pass the key around outside of this object.
- start() : bool
- stop() : bool
- test() : bool
Properties
$default_key
public
mixed
$default_key
= \null
$update_interval
public
mixed
$update_interval
= 30
$update_iteration
public
mixed
$update_iteration
= 1
$last_data
protected
mixed
$last_data
= \null
$obj
protected
mixed
$obj
= \null
$key_prefix
private
mixed
$key_prefix
= 'progress_bar_'
$last_update_time
private
mixed
$last_update_time
= \null
Methods
__construct()
ProgressBar constructor.
public
__construct() : mixed
Return values
mixed —calculateRemainingTime()
public
calculateRemainingTime() : mixed
Return values
mixed —delete()
public
delete( $key) : bool
Parameters
Return values
bool —error()
public
error( $key[, null $msg = null ]) : bool
Parameters
Return values
bool —get()
public
get( $key) : bool
Parameters
Return values
bool —getDefaultKey()
public
getDefaultKey() : null
Return values
null —getLastData()
public
getLastData() : array<string|int, mixed>|null
Return values
array<string|int, mixed>|null —getSharedMemoryObject()
Lazy load the SharedMemory object because if its using REDIS it would make a connection immediately rather than when its actually needed.
public
getSharedMemoryObject() : false|SharedMemory|null
Return values
false|SharedMemory|null —set()
public
set( $key, int $current_iteration[, null $msg = null ]) : bool
Parameters
Return values
bool —setDefaultKey()
Allow setting a default key so we don't have to pass the key around outside of this object.
public
setDefaultKey( $key) : mixed
Parameters
Return values
mixed —start()
public
start( $key[, int $total_iterations = 100 ][, int $update_iteration = null ][, null $msg = null ]) : bool
Parameters
Return values
bool —stop()
public
stop( $key) : bool
Parameters
Return values
bool —test()
public
test( $key[, int $total_iterations = 10 ]) : bool