src/ministruts/Request.php
public function getActionMessage($key = null) {
        $messages = $this->getAttribute(ACTION_MESSAGES_KEY);

        if ($key === null) {                            // return the first one
            if ($messages) {
                foreach ($messages as $message) return $message;
            }
        }
        elseif (key_exists($key, $messages)) {          // return the specified one
            return $messages[$key];
        }
        return $this->getActionError($key);             // look-up separately stored ActionErrors
    }
public function getActionMessage($key = null) {
        $messages = $this->getAttribute(ACTION_MESSAGES_KEY);

        if ($key === null) {                            // return the first one
            if ($messages) {
                foreach ($messages as $message) return $message;
            }
        }
        elseif (key_exists($key, $messages)) {          // return the specified one
            return $messages[$key];
        }
        return $this->getActionError($key);             // look-up separately stored ActionErrors
    }
public function getActionMessage ( $ key = null ) { $ messages = $ this -> getAttribute ( ACTION_MESSAGES_KEY ) ; if ( $ key === null ) { // return the first one if ( $ messages ) { foreach ( $ messages as $ message ) return $ message ; } } elseif ( key_exists ( $ key , $ messages ) ) { // return the specified one return $ messages [ $ key ] ; } return $ this -> getActionError ( $ key ) ; // look-up separately stored ActionErrors }
Return the ActionMessage for the specified key or the first ActionMessage if no key was given.

@param  string $key [optional]

@return string|null - ActionMessage
Return the ActionMessage for the specified key or the first ActionMessage if no key was given .