public static function getInstance() { if (!self::$instance) { self::$instance = new CurrentUser(); } return self::$instance; }
/** * The current (logged in) user. * @return CurrentUser The current user instance */ public function user() { static $result = null; if (empty($result)) { $result = CurrentUser::instance(); } return $result; }