Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private static $_yourData;
- public static function getAll()
- {
- if (static::$_yourData === null) {
- static::$_yourData = static::model()->findAll();
- }
- return static::$_yourData;
- }
- call it like :
- $myModels = MyModel::getAll();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement