function _batch_example_get_http_requests in Examples for Developers 7
Utility function to count the HTTP requests in a session variable.
Return value
int Number of requests.
Related topics
1 call to _batch_example_get_http_requests()
- batch_example_finished in batch_example/
batch_example.module - Batch 'finished' callback used by both batch 1 and batch 2.
File
- batch_example/
batch_example.module, line 314 - Outlines how a module can use the Batch API.
Code
function _batch_example_get_http_requests() {
return !empty($_SESSION['http_request_count']) ? $_SESSION['http_request_count'] : 0;
}