Ferreteria/v0.6/clade/Sys/Events/InputRq/Setting
Jump to navigation
Jump to search
| ||||||||||||||||||||
About
- in repo: code
A Setting is an InputRq whose primary (or only) purpose is to change the value of a setting used by any other InputRqs that might need it. The value is saved under the Setting's assigned name (NameOfInput()).
- Purpose: an Actor object that can modify the value/state of an Option object
- The value can be required or optional, depending on the `valreq` attribute.
Pages
#TODO
- 2025-03-08 Should probably be renamed "Simple", ocelot, since all
InputRqs will now accept a value (by default, anyway). - 2024-10-29 We might, at some point, want to generalize this so it's not dependent on a *tag*-Option but instead some more generalized Option State interface (to be written, I guess). For now, Get It Working.
Pieces
Input()is the full/raw/unparsed value-string associated with this item in the commandItem()is the XML tag (or, eventually, some generic equivalent) which defines the UI details for this subcommandOInput()is the InRqData object for interpreting the `Input()` value
History
- 2024-10-28 created (for WUIDL)
- 2024-11-19 renamed/moved from [WF]Sys\Routing\Action -> [WF]Sys\Events\Actor
- 2024-12-14 switched to static pseudoconstructor to make tracing easier
- 2024-12-22 created ValReq
- 2024-12-23 decided that value requirements (quantity, list...) should be in the UI XML instead of being defined by the podling class. This simplifies the code-structure.
- Deleting Option/ValReq (after first creating ValOpt, which is now also deleted).
- 2025-01-21 Renaming this clade from Option -> Settable, for clarity
- 2025-01-23 Made `Item()` public so Settings can access it.
- 2025-03-08
- Moving
FromItemValue()to parent (InputRq). - Renaming
WithInput()to `ParseInput()`, because now this (setting by actor key) is just one way of parsing.
- Moving
- 2025-09-01 renamed from "Settable" to "Setting"
Functions
public
function Describe() : string(override)function Go()(override)function NameOfInput() : string}}
internal
function ParseInputString(string $s) : voidfunction ParseInputArgs(array $arArgs) {}(no code here)$arArgs= number-based array of additional values (if any) (e.g. for "cmd:stuff:things:more", $arArgs will be [0]=>"things", [1]=>"more)- By default, these aren't retained since their meaning is action-dependent. Podlings can override this.