/** * Create a new object from an existing revision object. * * @param Revision $rev A revision object * @param bool $useMasterDB Whether to query the MASTER DB on Title lookup. * * @return WallNotificationEntity|null */ public static function createFromRev(Revision $rev, $useMasterDB = false) { $wn = new WallNotificationEntity(); if ($wn->loadDataFromRev($rev, $useMasterDB)) { $wn->saveToCache(); return $wn; } return null; }