public function removeFlash($key)
    {
        $counters = $this->get($this->flashParam, []);
        $value = isset($this->data[$key], $counters[$key]) ? $this->data[$key] : null;
        unset($counters[$key], $this->data[$key]);
        $this->data[$this->flashParam] = $counters;

        return $value;
    }
public function removeFlash($key)
    {
        $counters = $this->get($this->flashParam, []);
        $value = isset($this->data[$key], $counters[$key]) ? $this->data[$key] : null;
        unset($counters[$key], $this->data[$key]);
        $this->data[$this->flashParam] = $counters;

        return $value;
    }
public function removeFlash ( $ key ) { $ counters = $ this -> get ( $ this -> flashParam , [ ] ) ; $ value = isset ( $ this -> data [ $ key ] , $ counters [ $ key ] ) ? $ this -> data [ $ key ] : null ; unset ( $ counters [ $ key ] , $ this -> data [ $ key ] ) ; $ this -> data [ $ this -> flashParam ] = $ counters ; return $ value ; }
Removes a flash message.
@param string $key the key identifying the flash message. Note that flash messages
and normal session variables share the same name space.  If you have a normal
session variable using the same name, it will be removed by this method.
@return mixed the removed flash message. Null if the flash message does not exist.
@see getFlash()
@see setFlash()
@see addFlash()
@see removeAllFlashes()
Removes a flash message .