API / Minn\Runtime / SymbolTable

SymbolTable final class

Minn\Runtime\SymbolTable · public/minn/src/Minn/Runtime/SymbolTable.php · 69 lines

What a folder's PHP names, collected while its tokens are read: the functions it calls, the classes it references, and what it declares or guards itself, so the gate can subtract those before judging it.

Used by 1

Constants and properties

privatearray $calls
privatearray $classes
privatearray $declared
privatearray $declaredGlobal
privatearray $declaredClasses
privatearray $guarded

Public

methodcall(string $name): void#

Notes a function called.

methodclassRef(string $name): void#

Notes a class referenced.

methoddeclare(string $function): void#

Notes a function the folder declares, a method included: a call by that name is not a need.

methoddeclareGlobal(string $function): void#

Notes a function declared in the global scope, which the runtime must not already define.

methoddeclareClass(string $class): void#

Notes a class the folder declares.

methodguard(string $name): void#

A name an existence check protects: function_exists, class_exists, defined, and the rest.

methodtoArray(bool $truncated): array#

The table as the gate reads it.

@return array{calls: list<string>, classes: list<string>, declared: array<string, true>, declaredGlobal: array<string, true>, declaredClasses: array<string, true>, guarded: array<string, true>, truncated: bool}