public function setFlash($value, $index = null)
    {
        if ( ! $this->isOpened()) {
            $this->start();
        }
        if (!empty($index)) {
            $this->flashes[$index] = $value;
        } else {
            $this->flashes[] = $value;
        }
        return $this;
    }
public function setFlash($value, $index = null)
    {
        if ( ! $this->isOpened()) {
            $this->start();
        }
        if (!empty($index)) {
            $this->flashes[$index] = $value;
        } else {
            $this->flashes[] = $value;
        }
        return $this;
    }
public function setFlash ( $ value , $ index = null ) { if ( ! $ this -> isOpened ( ) ) { $ this -> start ( ) ; } if ( ! empty ( $ index ) ) { $ this -> flashes [ $ index ] = $ value ; } else { $ this -> flashes [ ] = $ value ; } return $ this ; }
Set a current session flash parameter

@param mixed $value
@param string $index
@return self
Set a current session flash parameter