NamedCall
An operation, and the arguments a document fixes for it (greenhouse decisions/0615). A standing grant never says «anything like this»: it names each operation whole, by its identity, and the values a call must carry to be the act that was meant. The same shape names the act a grant covers, the operation that measures one of its conditions, and the one that watches its falsifier — three places, one way of naming a call. TWO WAYS OF MATCHING, AND WHICH PLACE USES WHICH. · {@see self::matches()} — OPEN. The call is that operation and carries each fixed argument with exactly that value; what the document does not fix is free. It is what lets one grant cover a CLASS of acts: the candidate changes on every call. Only `covers` is read this way. · {@see self::matchesExactly()} — CLOSED. Besides the fixed arguments, a call may carry only the ones named in `free` (the argument that says WHICH candidate). An instrument and a watcher are read this way, because an open match fails open there: a later run with an argument nobody described — `--lenient`, `--skip=…` — would speak for the condition, and a green one would cover a red one (greenhouse decisions/0615, «Lo que la revisión encontró», 5). WHAT AN ARGUMENT IS FIXED TO (decided by Rod, 2026-10-12). A value that is text is VISIBLE ASCII and nothing else — the characters from `!` to `~`, single spaces inside it, none around it. A fixed value is compared byte by byte with what a caller sends, so a value that reads «strict» and is «strict» with a zero-width space after it is another run: the run a person read may have said no, and the look-alike said yes. What that costs, and was accepted: an argument cannot be fixed to a value with an accent, an ñ, or a letter of another alphabet — nor to the empty text, which is no character at all. A value that is not text — a whole number, true or false — is as it always was. AND WHAT A HOST OWES IT: a host that lists a grant, or asks a person to sign one, shows it to whoever signs through {@see Canonical::shown()} — the value as it is spelled, in quotes, so that the word «true» and the answer true are never the same line on a screen.
NamedCall::__construct()
public function __construct(?mixed $operation, array $arguments = [], array $free = []):Parameters
| Name | Type | Description |
|---|---|---|
| $operation | mixed | the operation, by its name as TEXT — anything else is a `TypeError`, whatever the caller's file declares ({@see self::named()}) |
| $arguments | array<array-key, mixed> | the values a call must carry, by argument name |
| $free | array<array-key, mixed> | the arguments a call may also carry, with any value — for a closed match: typically the one that says which candidate |
NamedCall::named()
public static function named(?mixed $operation): ?Milpa\Command\Consent\OperationIdThe one operation a text names — or `null` when it names none. A name is given as it reads, with nothing before or after it. The identity of an operation is forgiving about HOW a surface spells it — `lab:scan`, `lab.scan`, `lab_scan`, in capitals or not — and that forgiveness used to reach what stood at either end: a space, a line break, a tab or a null byte, and a separator too (`:lab:scan:`), each taken off before anything looked. Nothing is taken off here: a spelling names an operation when its identity is that same spelling, separator for separator — and an identity is lowercase letters, digits, dashes and dots, so nothing else is in it either. IT IS ASKED OF THE TEXT, NEVER OF AN IDENTITY BUILT ELSEWHERE. An {@see OperationId} has already had its ends taken off, and nothing can ask for them back: so a named call, a receipt and a call are given the name as text, and make the identity from it here, after it has been looked at. THE TYPE IS ASKED HERE, NOT LEFT TO THE CALLER'S FILE. `strict_types` belongs to whoever calls: from PHP's default mode an `OperationId` — it is `Stringable` — turns itself into text before a parameter typed `string` ever sees it, and the identity built elsewhere is in. So the parameter takes anything, and what is not a text is a `TypeError` for every caller.
Parameters
| Name | Type | Description |
|---|---|---|
| $operation | mixed | the name, as text |
Throws
\TypeError when what is handed in is not a text
NamedCall::fixable()
public static function fixable(?mixed $value): boolWhether a value is one an argument can be fixed to: a whole number, true or false, or text a person can read and no other — visible ASCII, at least one character, single spaces inside, none around.
Parameters
| Name | Type | Description |
|---|---|---|
| $value | ?mixed |
NamedCall::matches()
public function matches(Milpa\Command\Consent\OperationId|string $operation, array $arguments): boolWhether a call is the one this names: that operation, carrying every fixed argument with that value.
Parameters
| Name | Type | Description |
|---|---|---|
| $operation | Milpa\Command\Consent\OperationId|string | |
| $arguments | array<string, mixed> |
NamedCall::matchesExactly()
public function matchesExactly(Milpa\Command\Consent\OperationId|string $operation, array $arguments): boolWhether a call is EXACTLY the one this describes: that operation, every fixed argument with that value, and no argument besides them except the ones left free.
Parameters
| Name | Type | Description |
|---|---|---|
| $operation | Milpa\Command\Consent\OperationId|string | |
| $arguments | array<string, mixed> |
NamedCall::toArray()
public function toArray(): arrayThe name as data. `arguments` and `free` appear only when they say something, so one call has one spelling.
NamedCall::fromArray()
public static function fromArray(?mixed $data, string $where): selfThe inverse of {@see self::toArray()}; `$where` names the place in the document, for the refusal.
Parameters
| Name | Type | Description |
|---|---|---|
| $data | ?mixed | |
| $where | string |