Public Method Details |
Cache |
public void Cache( )
|
|
Class constructor
|
Returns |
void |
|
check_box |
public string check_box( [ string $cache_time ], string $name, [ mixed $options ] )
|
|
Return contents of cached box when it exists
|
Parameter |
|
string |
$cache_time |
= >>"60"<< |
|
validity of the cache (seconds) |
|
|
|
|
mixed |
$options |
= >>""<< |
|
or array of options. |
|
Returns |
string content of the file, void if file does not exist. |
|
write_box |
public string write_box( string $name, mixed $options, string $input )
|
|
Writes a box in cache
|
Parameter |
|
string |
$name |
|
|
name of the box |
|
|
mixed |
$options |
|
|
or array of options |
|
|
string |
$input |
|
|
content of box. |
|
Returns |
string the input if failed to created cache dir. |
|
write_html |
public void write_html( string $file, string $text )
|
|
Writes a full page in cache?
|
Parameter |
|
|
|
string |
$text |
|
|
text to write |
|
Returns |
void |
|
delete_files |
public void delete_files( string $dir, boolean $location, boolean $recurs, boolean $rmdir, boolean $rmtag, string $pattern, string $dirpattern )
|
|
Delete cached files
|
Parameter |
|
string |
$dir |
|
|
directory where are the files to delete |
|
|
boolean |
$location |
|
|
if true, $dir is subdir of htmldir, else of cachedir |
|
|
boolean |
$recurs |
|
|
if true, runs through directories recursively |
|
|
boolean |
$rmdir |
|
|
delete directories? |
|
|
boolean |
$rmtag |
|
|
tag files for deletion? |
|
|
string |
$pattern |
|
|
name pattern of files to delete (english?!?) |
|
|
string |
$dirpattern |
|
|
name pattern of dirss to delete |
|
Returns |
void |
|
delete_htmlfiles |
public void delete_htmlfiles( string $dir, [ boolean $recurs, boolean $rmdir, boolean $rmtag, string $pattern, string $dirpattern ] )
|
|
Mnemonic shorthand
|
Parameter |
|
string |
$dir |
|
|
directory where are the files to delete |
|
|
boolean |
$recurs |
= >>false<< |
|
if true, runs through directories recursively |
|
|
boolean |
$rmdir |
= >>false<< |
|
delete directories? |
|
|
boolean |
$rmtag |
= >>false<< |
|
tag files for deletion? |
|
|
string |
$pattern |
= >>".*"<< |
|
name pattern of files to delete (english?!?) |
|
|
string |
$dirpattern |
= >>""<< |
|
name pattern of dirss to delete |
|
Returns |
void |
See Also |
delete_files() |
|
delete_boxfiles |
public void delete_boxfiles( string $dir, [ boolean $recurs, boolean $rmdir, boolean $rmtag, string $pattern ] )
|
|
Mnemonic shorthand
|
Parameter |
|
string |
$dir |
|
|
directory where are the files to delete |
|
|
boolean |
$recurs |
= >>false<< |
|
if true, runs through directories recursively |
|
|
boolean |
$rmdir |
= >>false<< |
|
delete directories? |
|
|
boolean |
$rmtag |
= >>false<< |
|
tag files for deletion? |
|
|
string |
$pattern |
= >>".*"<< |
|
name pattern of files to delete (english?!?) |
|
Returns |
void |
See Also |
delete_files() |
|
delete_obsolete_news |
public void delete_obsolete_news( integer $news_id )
|
|
Delete outdated cache files for news $news_id
|
Parameter |
|
integer |
$news_id |
|
|
of the news |
|
Returns |
void |
|