/** * Get instance * * @return Flash */ public function getInstance() { if (!self::$instance) { self::$instance = new self(); } return self::$instance; }
public function process_request($request) { // handle Flash system should initialized before any others // so we clean here // TODO do we need ajax request check before clean flash? mfFlash::getInstance()->clean(); return $request; }
/** * Get Magic View Vars * * @return array */ public function getMagicViewVars() { $magic_vars = array('mf_flash' => mfFlash::getInstance(), 'mf_request' => mfRequest::getInstance(), 'mf_user' => mfUser::getInstance()); return $magic_vars; }