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

        if ($namespace) {
            if (!$container->offsetExists($namespace)) {
                return false;
            }

            unset($container->{$namespace});
            return true;
        }

        foreach ($container as $namespace => $notifications) {
            $container->offsetUnset($namespace);
        }

        return true;
    }
public function clearCurrent($namespace = null)
    {
        $container = $this->getContainer();

        if ($namespace) {
            if (!$container->offsetExists($namespace)) {
                return false;
            }

            unset($container->{$namespace});
            return true;
        }

        foreach ($container as $namespace => $notifications) {
            $container->offsetUnset($namespace);
        }

        return true;
    }
public function clearCurrent ( $ namespace = null ) { $ container = $ this -> getContainer ( ) ; if ( $ namespace ) { if ( ! $ container -> offsetExists ( $ namespace ) ) { return false ; } unset ( $ container -> { $ namespace } ) ; return true ; } foreach ( $ container as $ namespace => $ notifications ) { $ container -> offsetUnset ( $ namespace ) ; } return true ; }
Clear notifications from container if namespace is provided or clear all notifications
added during this request if namespace is not provided.

@param null $namespace
@return bool
Clear notifications from container if namespace is provided or clear all notifications added during this request if namespace is not provided .