Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

adds static flushStatic method to CActiveRecord as described in issue #2... #2006

Closed
wants to merge 1 commit into
from
Jump to file or symbol
Failed to load files and symbols.
+11 −0
Split
@@ -390,6 +390,17 @@ public static function model($className=__CLASS__)
return $model;
}
}
+
+ /**
+ * Clears all cached instances of static ActiveRecord models
+ * provided for invoking class-level methods (something similar to static class methods.)
+ *
+ * @return null
+ */
+ public static function flushStatic()
+ {
+ self::$_models = array();
+ }
/**
* Returns the meta-data for this AR