src/ministruts/Request.php
public function isActionMessage($keys = null) {
        $messages = $this->getAttribute(ACTION_MESSAGES_KEY);
        if (!$messages)
            return $this->isActionError($keys);

        if (is_string($keys))
            $keys = [$keys];

        if (is_array($keys)) {
            foreach ($keys as $key) {
                if (key_exists($key, $messages)) return true;
            }
            if ($keys)
                return $this->isActionError($keys);
            $keys = null;
        }

        if (is_null($keys))
            return true;
        throw new IllegalTypeException('Illegal type of parameter $keys: '.gettype($keys));
    }
public function isActionMessage($keys = null) {
        $messages = $this->getAttribute(ACTION_MESSAGES_KEY);
        if (!$messages)
            return $this->isActionError($keys);

        if (is_string($keys))
            $keys = [$keys];

        if (is_array($keys)) {
            foreach ($keys as $key) {
                if (key_exists($key, $messages)) return true;
            }
            if ($keys)
                return $this->isActionError($keys);
            $keys = null;
        }

        if (is_null($keys))
            return true;
        throw new IllegalTypeException('Illegal type of parameter $keys: '.gettype($keys));
    }
public function isActionMessage ( $ keys = null ) { $ messages = $ this -> getAttribute ( ACTION_MESSAGES_KEY ) ; if ( ! $ messages ) return $ this -> isActionError ( $ keys ) ; if ( is_string ( $ keys ) ) $ keys = [ $ keys ] ; if ( is_array ( $ keys ) ) { foreach ( $ keys as $ key ) { if ( key_exists ( $ key , $ messages ) ) return true ; } if ( $ keys ) return $ this -> isActionError ( $ keys ) ; $ keys = null ; } if ( is_null ( $ keys ) ) return true ; throw new IllegalTypeException ( 'Illegal type of parameter $keys: ' . gettype ( $ keys ) ) ; }
Whether an ActionMessage exists for one of the specified keys, or for any key if no key was given.

@param  string|string[] $keys [optional] - message keys

@return bool
Whether an ActionMessage exists for one of the specified keys or for any key if no key was given .