This repository has been archived on 2025-02-26. You can view files and clone it, but cannot push or open issues or pull requests.
szurubooru/src/Models/Entities/AbstractEntity.php
2014-05-05 18:03:17 +02:00

28 lines
433 B
PHP

<?php
abstract class AbstractEntity implements IValidatable
{
public $id;
protected $__cache = [];
public function resetCache()
{
$this->__cache = [];
}
public function setCache($key, $value)
{
$this->__cache[$key] = $value;
}
public function getCache($key)
{
return isset($this->__cache[$key])
? $this->__cache[$key]
: null;
}
public function hasCache($key)
{
return isset($this->__cache[$key]);
}
}