Access flash object.

@access  public

@return  \Clovers\Session\Flash
176662
public function flash()
    {
        if($this->flashdata === null)
        {
            $this->flashdata = new Flash(isset($_SESSION[$this->flashslot]) ? $_SESSION[$this->flashslot] : array());
        }
        
        return $this->flashdata;
    }
1204246
public function allFlashes()
    {
        if ( ! $this->isOpened()) {
            $this->start();
        }
        if (!empty($this->old_flashes)) {
            $_oldf = $this->old_flashes;
            $this->old_flashes = array();
            return $_oldf;
        }
        return null;
    }
706220
public function redirect(array $flashes = array())
    {
        foreach($flashes as $type => $message){
            $this->getAppController()->flash()->add($type, $message);
        }
        return $this->getAppController()->redirect($this->getRequest()->getRequestUri());
    }
612016
public function getSession()
    {
        if (is_null($this->session)) {
            $this->session = $this->cluster->connect($this->getKeyspace());
        }

        return $this->session;
    }
1115504
public function getSession()
    {
        if ($this->_session === false) {
            $sessionId = is_callable($this->sessionKey) ? call_user_func($this->sessionKey,
                $this) : $this->headers->first($this->sessionKey);
            if ($session = session()->get($sessionId)) {
                $this->_session = $session;
            } else {
                $this->_session = null;
            }
        }

        return $this->_session;
    }
1334150
public function fopen()
    {
        return fopen(
            self::WNAME . '://' . spl_object_hash($this),
            'rb',
            false,
            stream_context_create(array(
                self::WNAME => array(
                    'string' => $this
                )
            ))
        );
    }
1090690
public function getFlashVarsAsString()
	{
		$params=array();
		foreach($this->flashVars as $k=>$v)
			$params[]=urlencode($k).'='.urlencode($v);
		return CJavaScript::quote(implode('&',$params));
	}
324961
public function actionRun()
    {
        Yii::$app->session->set(Installation::SESSION_KEY, 0);

        if ($this->module->userComponent !== true && empty($this->module->adminId)) {
            $this->warning(Yii::t('podium/flash', "{userComponent} is set to custom but no administrator ID has been set with {adminId} parameter. Administrator privileges will not be set.", [
                'userComponent' => '$userComponent',
                'adminId' => '$adminId'
            ]));
        }
        return $this->render('run', ['version' => $this->module->version]);
    }
1102014
public function getFlash($index)
    {
        if ( ! $this->isOpened()) {
            $this->start();
        }
        $_oldf = null;
        if (!empty($index) && isset($this->old_flashes[$index])) {
            $_oldf = $this->old_flashes[$index];
            unset($this->old_flashes[$index]);
            return $_oldf;
        }
        return null;
    }
421851
public function flash($key, $value)
    {
        return $this->session->flash($this->getSessionKey($key), $value);
    }
328934
public static function Session() {
      if (is_null(self::$_Session))
         self::$_Session = self::Factory(self::AliasSession);
      return self::$_Session;
   }
371042
public static function get_flash($name = null, $default = null, $expire = null)
	{
		return static::instance()->get_flash($name, $default, $expire);
	}
488099
public function flash(array $data = array())
    {
        if(count($data) == 0 && $this->exe->request === null)
            return;

        $data = count($data) > 0 ? $data : $this->exe->request->getParsedBody();

        $this->exe->flash->set('form_data', $data);

        return $this;
    }
911406
protected function getFlashes()
    {
        /* @var $session \yii\web\Session */
        $session = Yii::$app->has('session', true) ? Yii::$app->get('session') : null;
        if ($session === null || !$session->getIsActive()) {
            return [];
        }

        $counters = $session->get($session->flashParam, []);
        $flashes = [];
        foreach (array_keys($counters) as $key) {
            if (array_key_exists($key, $_SESSION)) {
                $flashes[$key] = $_SESSION[$key];
            }
        }
        return $flashes;
    }
1046729
protected function registerFlash() {
        $container = $this->container;
        $this->container->set('flash', function() use ($container) {
            return new Flash($container->get('session'));
        });
    }
1357053
public function getFlash($key = null)
    {
        $messages = $flash = '';

        if (!Session::has('flashMessages')) {
            return false;
        }

        $flashArray = Session::get('flashMessages');

        // Check $key is valid flash type
        if (in_array($key, $this->validFlashTypes)) {
            if (isset($flashArray[$key])) {
                foreach ($flashArray[$key] as $msg) {
                    $messages .= '<p>'.$msg."</p>\n";
                }
            }

            $flash .= sprintf(
                $this->flashWrapper,
                strtolower(Inflector::getClassName($this->class)),
                $key,
                $messages
            );

            // clear the viewed messages from browser
            $this->clearViewedMessages($key);

            // Print ALL queued messages
        } elseif (is_null($key)) {
            foreach ($flashArray as $key => $msgArray) {
                $messages = '';
                foreach ($msgArray as $msg) {
                    $messages .= '<p>'.$msg."</p>\n";
                }

                $flash .= sprintf($this->flashWrapper, strtolower($this->class), $key, $messages);
            }

            // clear already viewed messages
            $this->clearViewedMessages();

            // Invalid message type
        } else {
            return false;
        }

        return $flash;
    }
605821
protected function doFormAction ()
  {
//    if (count ($_POST) == 0 && count ($_FILES) == 0)
//      throw new FileException(FileException::FILE_TOO_BIG, ini_get ('upload_max_filesize'));
    $this->getActionAndParam ($action, $param);
    $class = new ReflectionObject ($this);
    try {
      $method = $class->getMethod ('action_' . $action);
    }
    catch (ReflectionException $e) {
      throw new FlashMessageException('Class <b>' . $class->getName () . "</b> can't handle action <b>$action</b>.",
        FlashType::ERROR);
    }
    return $method->invoke ($this, $param);
  }