|
noalyss Version-9
NOALYSS : serveur de comptabilité et ERP (2002)
|
Use one db for tracking progress bar value, the task id must be unique and let you follow the progress of a task. More...
Collaboration diagram for Progress_Bar:Public Member Functions | |
| __construct ($p_task_id) | |
| answer () | |
| Json answer of the task progressing if value is equal or greater than 100 , delete the row. | |
| get_value () | |
| Get the progress value from db. | |
| increment ($p_step) | |
| increment value with $p_step | |
| set_value ($p_value) | |
| Store the progress value into the db. | |
Private Attributes | |
| $db | |
| database connexion | |
| $task_id | |
| $value | |
| task id (progress_bar.p_id) | |
Use one db for tracking progress bar value, the task id must be unique and let you follow the progress of a task.
how it works : when calling an ajax , you have to create the task id and start the monitoring of it (js function = progress_bar_start). In your php script called by ajax you call Progress_Bar->set_value to show the progress. The timer created by progress_bar_start will check regularly the progress in the db. The ajax parameter for following the task is task_id
Definition at line 47 of file progress_bar.class.php.
| Progress_Bar::__construct | ( | $p_task_id | ) |
Definition at line 56 of file progress_bar.class.php.
| Progress_Bar::answer | ( | ) |
Json answer of the task progressing if value is equal or greater than 100 , delete the row.
Definition at line 105 of file progress_bar.class.php.
References db, get_value(), and value.
Here is the call graph for this function:| Progress_Bar::get_value | ( | ) |
| Progress_Bar::increment | ( | $p_step | ) |
increment value with $p_step
| int | $p_step |
Definition at line 120 of file progress_bar.class.php.
References $p_step, set_value(), and value.
Here is the call graph for this function:| Progress_Bar::set_value | ( | $p_value | ) |
Store the progress value into the db.
| integer | $p_value | value of the progress between 0 & 100 @exceptions code 1005 - if p_value is not in between 0 & 100 |
Definition at line 78 of file progress_bar.class.php.
References db, EXC_PARAM_VALUE, and value.
Referenced by Document_Export\export_all(), and increment().
|
private |
database connexion
Definition at line 49 of file progress_bar.class.php.
|
private |
Definition at line 50 of file progress_bar.class.php.
|
private |
task id (progress_bar.p_id)
value of progress (between 0 & 100)
Definition at line 51 of file progress_bar.class.php.
Referenced by get_value().