Page 6 of 8
Private Methods:
_gen_var_val
- Prototype:
- _gen_var_val (array $vars)
- Description:
- Converts an associative array of $vars[name] = value into a url query string of the form: name1=val1&name2=val2&...
_gen_filename
- Prototype:
- string _gen_filename (void)
- Description:
- Generates a unique filename based on the name of the file being cached. First it replaces all slashes (/) by underlines (_), and then if the $USEVARS variable is set to "in_name", appends the rawurlencode'd contents of $VARSVAL to the filename.
_key_in_array
- Prototype:
- boolean _key_in_array (string $key, array $arr)
- Description:
- Returns true if the key is in the array, false otherwise.
_is_valid_time_unit
- Prototype:
- boolean _is_valid_time_unit (string $timeunit)
- Description:
- Returns true if a the parameter passed is a valid time unit, false otherwise.
_mktimestamp
- Prototype:
- int _mktimestamp (void)
- Description:
- Returns a timestamp in seconds. Wrapper for time().
_diff_time
- Prototype:
- int _diff_time (int $end, int $start[, string $timeunit])
- Description:
- Returns the difference between the $end and $start timestamps, in the units indicated by $timeunit. If the third parameter is omitted, it defaults to "day".
- Example:
// return the number of whole days between the 2 timestamps
echo $obj->_diff_time($end, $start);
// return the number of whole minutes between the 2 timestamps
echo $obj->_diff_time($end, $start, "minute");
| < Prev |
|---|









