SymbolGap final readonly class
Minn\Runtime\SymbolGap · public/minn/src/Minn/Runtime/SymbolGap.php · 196 lines
The part of the reference's interface the runtime does not answer: names in data/api-names.json that no facade file defines. It is the whole input the symbol gate needs, so it can be exported to JSON and carried to a machine that holds plugin source but no engine, which is how the catalogue-wide compatibility scan runs.
Constants and properties
| prop | readonly array $functions | Promoted from the constructor. |
| prop | readonly array $classes | Promoted from the constructor. |
| prop | readonly array $known | Promoted from the constructor. |
| prop | readonly array $pluggable | Promoted from the constructor. |
Public
| new | __construct(array $functions, array $classes, array $known = array ( ), array $pluggable = array ( ))# |
| ||||||||||||
| static | ofLoadedFacade(string $engineDir): self# | Reads the reference's interface and subtracts everything the loaded facade defines. A plugin may define a name as it loads, so each call asks again, but only about the names still lacking: a name once defined stays defined, and asking about all four thousand for every plugin was a cost of its own. | ||||||||||||
| static | ofShippedFacade(string $engineDir): self# | The gap read from the engine's own files without loading them, for a machine that has the engine but runs no site with it yet (preflight): a name counts as defined when a facade file declares it. | ||||||||||||
| static | fromFile(string $path): self# | The gap read from its JSON file. | ||||||||||||
| method | lacksFunction(string $name): bool# | Whether the runtime lacks a function. | ||||||||||||
| method | defines(string $name): bool# | Whether the runtime already defines a function of the reference's interface, so a plugin declaring it again without a guard would fail to compile. The pluggable functions are not counted: the runtime defines those after the plugins load, each only where no plugin did. | ||||||||||||
| method | lacksClass(string $name): bool# | Whether the runtime lacks a class. | ||||||||||||
| method | json(): string# | The gap as JSON. |
Internals 2
Private and protected methods: how the class does its work. Not a contract; they change whenever the code is tidied.
| private | typeExists(string $name): bool# | Whether a class, interface, trait or enum of this name is defined. |
| private | declaredIn(string $source): array# | The global functions and the classes (with their namespace) one file declares, lower-cased; a method, a closure and an anonymous class are not declarations. @return array{0: array<string, true>, 1: array<string, true>} |
Nothing matches.