added static php-crud-api

This commit is contained in:
zino
2021-01-20 13:13:22 +01:00
parent ea9085b4a4
commit fda9de0fa5
175 changed files with 770 additions and 15545 deletions

View File

@@ -86,9 +86,6 @@ class TempFileCache implements Cache
if ($data === false) {
return '';
}
if (strpos($data, '|') === false) {
return '';
}
list($ttl, $string) = explode('|', $data, 2);
if ($ttl > 0 && time() - filemtime($filename) > $ttl) {
return '';
@@ -121,18 +118,18 @@ class TempFileCache implements Cache
if (strlen($entry) != $len) {
continue;
}
if (file_exists($filename) && is_file($filename)) {
if (is_file($filename)) {
if ($all || $this->getString($filename) == null) {
@unlink($filename);
unlink($filename);
}
}
} else {
if (strlen($entry) != $segments[0]) {
continue;
}
if (file_exists($filename) && is_dir($filename)) {
if (is_dir($filename)) {
$this->clean($filename, array_slice($segments, 1), $len - $segments[0], $all);
@rmdir($filename);
rmdir($filename);
}
}
}