src/SmartFactory/MessageManager.php
public function setError($message, $details = "", $code = "")
    {
        if (empty($message)) {
            return;
        }
        
        // we keep messages in the session
        // until we are sure they are shown
        // otherwise some messages may be lost
        // because of redirection
        self::$session_vars["errors"][$message] = ["message" => $message, "details" => $details, "code" => $code];
    }
public function setError($message, $details = "", $code = "")
    {
        if (empty($message)) {
            return;
        }
        
        // we keep messages in the session
        // until we are sure they are shown
        // otherwise some messages may be lost
        // because of redirection
        self::$session_vars["errors"][$message] = ["message" => $message, "details" => $details, "code" => $code];
    }
public function setError ( $ message , $ details = "" , $ code = "" ) { if ( empty ( $ message ) ) { return ; } // we keep messages in the session // until we are sure they are shown // otherwise some messages may be lost // because of redirection self :: $ session_vars [ "errors" ] [ $ message ] = [ "message" => $ message , "details" => $ details , "code" => $ code ] ; }
Stores the error to be reported.

@param string $message
The error message to be reported.

@param string $details
The error details to be reported. Here, more
technical details should be placed. Displaying
of this part might be controlled over a option
"display message details".

@param string $code
The error code to be reported.

@return void

@see getErrors()
@see clearErrors()
@see errorsExist()

@author Oleg Schildt
Stores the error to be reported .