src/ministruts/Request.php
public function getActionError($key = null) {
        $errors = $this->getAttribute(ACTION_ERRORS_KEY);

        if ($key === null) {                            // return the first one
            if ($errors) {
                foreach ($errors as $error) return $error;
            }
        }
        elseif (key_exists($key, $errors)) {            // return the specified one
            return $errors[$key];
        }
        return null;
    }
public function getActionError($key = null) {
        $errors = $this->getAttribute(ACTION_ERRORS_KEY);

        if ($key === null) {                            // return the first one
            if ($errors) {
                foreach ($errors as $error) return $error;
            }
        }
        elseif (key_exists($key, $errors)) {            // return the specified one
            return $errors[$key];
        }
        return null;
    }
public function getActionError ( $ key = null ) { $ errors = $ this -> getAttribute ( ACTION_ERRORS_KEY ) ; if ( $ key === null ) { // return the first one if ( $ errors ) { foreach ( $ errors as $ error ) return $ error ; } } elseif ( key_exists ( $ key , $ errors ) ) { // return the specified one return $ errors [ $ key ] ; } return null ; }
Return the ActionError for the specified key or the first ActionError if no key was given.

@param  string $key [optional]

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