Ferreteria/v0.6/clade/Sys/Events/ItWent

From Woozle Writes Code
< Ferreteria‎ | v0.6‎ | clade‎ | Sys‎ | Events
Revision as of 15:30, 1 October 2025 by Woozle (talk | contribs)
Jump to navigation Jump to search
clade: Sys\Events\ItWent
Clade Family
StandardBase ItWent

CommOp
ReadOp

Clade Aliases
Alias Clade
Base* StandardBase
Msg* Message

About

  • purpose: an object that can report status and any related messages (usually errors or warnings) resulting from an attempted action, i.e. "how it went"

Any object can make use of this feature by using the ItWent iface/trait.

Functions

public

// SETUP

   static function AsNoOp() : self;

// ACTION

   function WasTried() : bool;
   function SetOkay(bool $ok);
   function GetOkay() : bool;
   function SetNoOp();
   function GetStatusText() : string;

// MESSAGES

   function AllMessages() : array; // mainly diagnostic
   function AnyMessages() : bool;
   function AddMsgObject(MsgIface $o) : void;
   function AddMsgString(string $s) : void;
   function RenderMessages() : string;

// ERRORS

   function HasError() : bool;
   function AddError(int $n, string $s);