Threads_Manager __construct(
unknown_type
$url_rewrite_var_name, [unknown_type
$snapshots_lifetime = Threads_Manager::SNAPSHOTS_DEFAULT_LIFETIME], [
$max_snapshots = Threads_Manager::MAX_SNAPSHOTS]
)
|
|
Constructor
Parameters:
|
unknown_type |
$url_rewrite_var_name: |
Name for the URL variable that will be used to track threads |
|
unknown_type |
$snapshots_lifetime: |
Number of seconds after which snapshot will be seen as garbage and eventually unset |
|
|
$max_snapshots: |
|
integer add_new_thread(
)
|
|
Adds new thread
API Tags:
| Return: | Index of the new thread |
| Internal: | |
| Access: | private |
integer add_snapshot(
integer
$thread_num
)
|
|
Adds snapshot for thread specified by $thread_num
Parameters:
|
integer |
$thread_num: |
thread index |
API Tags:
| Return: | Snapshot index |
| Internal: | |
| Access: | private |
Colects garbage snapshots
API Tags:
| Internal: | |
| Access: | private |
void create_new_thread(
)
|
|
Creates new thread
API Tags:
| Internal: | |
| Access: | private |
integer generate_new_random(
)
|
|
Generates random number
API Tags:
| Internal: | |
| Access: | private |
integer get_current_thread_index(
)
|
|
Returns current thread index
API Tags:
Returns reference to current thread Vars_Manager
API Tags:
unknown get_current_url_var(
)
|
|
Returns current URL variable value
API Tags:
string get_new_url_var(
)
|
|
Generates new value for URL rewrite variable
API Tags:
| Internal: | |
| Access: | private |
array get_snapshot(
integer
$thread_num, unknown_type
$snapshot_num
)
|
|
Returns snapshot of thread
Parameters:
|
integer |
$thread_num: |
thread index |
|
unknown_type |
$snapshot_num: |
Snapshot index |
API Tags:
| Internal: | |
| Access: | private |
integer get_snapshots_lifetime(
)
|
|
Returns lifetime setting for snapshots
API Tags:
| Return: | Lifetime in seconds |
| Access: | public |
Returns value of passed URL rewrite variable
Parameters:
API Tags:
| Internal: | |
| Access: | private |
unknown get_url_rewrite_var_name(
)
|
|
Returns URL variable name
API Tags:
unknown get_usage_stat(
)
|
|
Returns statistic about usage of threads and snapshots.
API Tags:
boolean is_url_rewrite_var_passed(
Web_Context
$context
)
|
|
Checks if URL variable is passed in POST or GET
Parameters:
API Tags:
| Internal: | |
| Access: | private |
void move_snapshot(
integer
$old_threat_index, integer
$snapshot_index, integer
$new_thread_index, string
$url_var
)
|
|
Moves snapshot from one thread to another.
Parameters:
|
integer |
$old_threat_index: |
|
|
integer |
$snapshot_index: |
|
|
integer |
$new_thread_index: |
|
|
string |
$url_var: |
|
API Tags:
| Internal: | |
| Access: | private |
Prepares ovject for new process
API Tags:
| Internal: | |
| Access: | private |
Processes current context and manages threads
Parameters:
API Tags:
void remove_url_var_to_thread_link(
integer
$thread_index, integer
$snapshot_index
)
|
|
Removes url_var_to_thread_link for given snapshot
Parameters:
|
integer |
$thread_index: |
|
|
integer |
$snapshot_index: |
|
API Tags:
| Internal: | |
| Access: | private |
Saves snapshot ot current thread
API Tags:
void snapshot_update_access_time(
Web_Context
$context
)
|
|
Updates last access time of current (detected from context) snapshot
Parameters:
API Tags: