2 require_once(dirname(__FILE__) .
'/../Exception/class.arException.php');
26 if (!isset(self::$cache[$class])) {
29 if (!isset(self::$cache[$class][$id]) || !self::$cache[$class][$id] instanceof
ActiveRecord) {
33 return in_array($id, array_keys(self::$cache[$class]));
41 if (!isset($object->is_new)) {
48 foreach (self::$cache as $class => $objects) {
64 public static function get($class, $id) {
65 if (!self::isCached($class, $id)) {
69 return self::$cache[$class][$id];
84 public static function flush($class_name) {
86 $class_name = get_class($class_name);
88 unset(self::$cache[$class_name]);