Class ilGlobalCacheDBLayer.
More...
Static Public Member Functions |
static | getInstance ($component, $table_name) |
Static Protected Attributes |
static | $instances = array() |
Detailed Description
Constructor & Destructor Documentation
ilGlobalCacheDBLayer::__construct |
( |
|
$component, |
|
|
|
$table_name, |
|
|
|
$ttl = NULL |
|
) |
| |
|
protected |
- Parameters
-
| $component | |
| $table_name | |
int | $ttl | |
Definition at line 55 of file class.ilGlobalCacheDBLayer.php.
References $component, $table_name, $ttl, getInstance(), getLoaded(), readFromCache(), setComponent(), setLoaded(), setTableName(), setTtl(), and writeToCache().
{
$this->readFromDB();
}
}
Member Function Documentation
ilGlobalCacheDBLayer::filter |
( |
array |
$data, |
|
|
|
$field, |
|
|
|
$value, |
|
|
|
$case_sensitive = true , |
|
|
|
$strip = true |
|
) |
| |
- Parameters
-
array | $data | |
| $field | |
| $value | |
bool | $case_sensitive | |
bool | $strip | |
- Returns
- array
Definition at line 128 of file class.ilGlobalCacheDBLayer.php.
References $result, and getTableName().
Referenced by getWhere().
{
if (is_array($value)) {
$index = md5(serialize($value)) . $case_sensitive;
} else {
$index = $value . $case_sensitive;
}
if (isset($this->cached_results[$this->
getTableName()][$field][$index])) {
return $this->cached_results[$this->
getTableName()][$field][$index];
}
foreach ($data as $dat) {
if ($case_sensitive) {
if (is_array($value)) {
if (in_array($dat->{$field}, $value)) {
}
} elseif ($dat->{$field} == $value) {
}
} else {
if (is_array($value)) {
if (preg_grep("/" . $dat->{$field} . "/i", $value)) {
}
} elseif (strcasecmp($dat->{$field}, $value) == 0) {
}
}
}
if (count(
$result) == 1 AND $strip) {
}
}
ilGlobalCacheDBLayer::get |
( |
|
$strip = true | ) |
|
ilGlobalCacheDBLayer::getCachedResults |
( |
| ) |
|
ilGlobalCacheDBLayer::getComponent |
( |
| ) |
|
static ilGlobalCacheDBLayer::getInstance |
( |
|
$component, |
|
|
|
$table_name |
|
) |
| |
|
static |
ilGlobalCacheDBLayer::getLoaded |
( |
| ) |
|
ilGlobalCacheDBLayer::getRawData |
( |
| ) |
|
ilGlobalCacheDBLayer::getTableName |
( |
| ) |
|
ilGlobalCacheDBLayer::getTtl |
( |
| ) |
|
ilGlobalCacheDBLayer::getWhere |
( |
|
$field, |
|
|
|
$value, |
|
|
|
$case_sensitive = true |
|
) |
| |
ilGlobalCacheDBLayer::readFromCache |
( |
| ) |
|
|
protected |
ilGlobalCacheDBLayer::setCachedResults |
( |
|
$cached_results | ) |
|
ilGlobalCacheDBLayer::setComponent |
( |
|
$component | ) |
|
ilGlobalCacheDBLayer::setLoaded |
( |
|
$loaded | ) |
|
ilGlobalCacheDBLayer::setRawData |
( |
|
$raw_data | ) |
|
ilGlobalCacheDBLayer::setTableName |
( |
|
$table_name | ) |
|
ilGlobalCacheDBLayer::setTtl |
( |
|
$ttl | ) |
|
ilGlobalCacheDBLayer::updateCachedResults |
( |
| ) |
|
|
protected |
ilGlobalCacheDBLayer::where |
( |
|
$field, |
|
|
|
$value, |
|
|
|
$case_sensitive = true |
|
) |
| |
- Parameters
-
| $field | |
| $value | |
bool | $case_sensitive | |
- Returns
- $this
Definition at line 181 of file class.ilGlobalCacheDBLayer.php.
{
$ilGcDbWhere->setField($field);
$ilGcDbWhere->setValue($value);
$ilGcDbWhere->setCaseSensitive($case_sensitive);
$this->wheres[] = $ilGcDbWhere;
return $this;
}
ilGlobalCacheDBLayer::writeToCache |
( |
| ) |
|
|
protected |
Field Documentation
ilGlobalCacheDBLayer::$cached_results = array() |
|
protected |
ilGlobalCacheDBLayer::$component = '' |
|
protected |
ilGlobalCacheDBLayer::$global_cache |
|
protected |
ilGlobalCacheDBLayer::$instances = array() |
|
staticprotected |
ilGlobalCacheDBLayer::$loaded = false |
|
protected |
ilGlobalCacheDBLayer::$raw_data = array() |
|
protected |
ilGlobalCacheDBLayer::$table_name = '' |
|
protected |
ilGlobalCacheDBLayer::$ttl = NULL |
|
protected |
ilGlobalCacheDBLayer::$wheres = array() |
|
protected |
The documentation for this class was generated from the following file: