src/Controller/Plugin/Notification.php
public function clear($namespace = null)
    {
        $this->getNotificationsFromContainer();

        if ($namespace) {
            if (isset($this->notifications[$namespace])) {
                unset($this->notifications[$namespace]);
                return true;
            }

            return false;
        }

        foreach ($this->notifications as $nm => $type) {
            unset($this->notifications[$nm]);
        }

        return true;
    }
public function clear($namespace = null)
    {
        $this->getNotificationsFromContainer();

        if ($namespace) {
            if (isset($this->notifications[$namespace])) {
                unset($this->notifications[$namespace]);
                return true;
            }

            return false;
        }

        foreach ($this->notifications as $nm => $type) {
            unset($this->notifications[$nm]);
        }

        return true;
    }
public function clear ( $ namespace = null ) { $ this -> getNotificationsFromContainer ( ) ; if ( $ namespace ) { if ( isset ( $ this -> notifications [ $ namespace ] ) ) { unset ( $ this -> notifications [ $ namespace ] ) ; return true ; } return false ; } foreach ( $ this -> notifications as $ nm => $ type ) { unset ( $ this -> notifications [ $ nm ] ) ; } return true ; }
Clear notifications from previous request by provided namespace or clear all
notifications if namespace is not provided

@param null $namespace
@return bool
Clear notifications from previous request by provided namespace or clear all notifications if namespace is not provided