classValueGraph
final class ValueGraph
Restricted visibility: declared "@visibility SqlSemantics". Code outside that scope must not name this declaration.
Audits that a value graph is deeply immutable and made of the closed value domain only.
Every reachable object must be an enum case or an instance of a final class of the admitted namespaces that uses the Snapshot trait and whose properties are all initialised readonly properties. Properties hold null, booleans, integers, strings, arrays without references, or such objects. Floats, closures, resources and classes of any other origin are rejected, whatever interface they implement.
Methods§
public function __construct(private list<string> $namespaces)Parameters
$namespaces | list<string> | The namespace prefixes of the closed value domain |
public function objects(object $root): list<object>Answers every object reachable from a root, the root included, after auditing each.
Parameters
$root | object |
Returns
list<object>Throws
InvalidConstruction When a reachable value is outside the closed immutable domainCalled from 8
- method-call SqlSemantics\Platform\PostgreSql\Model\Validation\Publication::establish() packages/sql-semantics-postgres/src/Model/Validation/Publication.php:50
- method-call SqlSemantics\Platform\PostgreSql\Model\Validation\Publication::establish() packages/sql-semantics-postgres/src/Model/Validation/Publication.php:60
- method-call SqlSemantics\Platform\PostgreSql\Rules\Query\Facts\CommonTableFacts::uses() packages/sql-semantics-postgres/src/Rules/Query/Facts/CommonTableFacts.php:116
- method-call SqlSemantics\Platform\PostgreSql\Rules\Query\Facts\ModifyingCommonTables::check() packages/sql-semantics-postgres/src/Rules/Query/Facts/ModifyingCommonTables.php:40
- method-call SqlSemantics\Platform\PostgreSql\Rules\Query\Facts\QueryRoots::derive() packages/sql-semantics-postgres/src/Rules/Query/Facts/QueryRoots.php:51
- method-call SqlSemantics\Platform\PostgreSql\Rules\Table\Command\TriggerReferences::references() packages/sql-semantics-postgres/src/Rules/Table/Command/TriggerReferences.php:87
- method-call SqlSemantics\Platform\PostgreSql\Rules\Table\Definition\GeneratedColumns::referenced() packages/sql-semantics-postgres/src/Rules/Table/Definition/GeneratedColumns.php:68
- method-call SqlSemantics\Platform\PostgreSql\Semantics::inspect() packages/sql-semantics-postgres/src/Semantics.php:174
Calls 10
- function-call
array_popline 51 - function-call
is_arrayline 52 - static-call Check::input() line 54
- static-call
ReflectionReference::fromArrayElement()line 54 - function-call
is_objectline 59 - function-call
is_boolline 60 - function-call
is_intline 60 - function-call
is_stringline 60 - function-call
spl_object_idline 63 - method-call ValueGraph::members() line 68
public function members(object $value): list<ReflectionProperty>Answers the properties to follow for an object after checking its class is admitted.
Parameters
$value | object |
Returns
list<ReflectionProperty>Throws
InvalidConstruction When the class is outside the closed immutable domainCalled from 1
Calls 8
- function-call
str_starts_withline 91 - static-call Check::input() line 93
- new
ReflectionClassline 97 - method-call
ReflectionClass::isFinal()line 98 - method-call
ReflectionClass::getProperties()line 100 - function-call
in_arrayline 104 - class-const Snapshot::class() line 104
- method-call
ReflectionClass::getTraitNames()line 104
Private surface 2§
Implementation details, listed for orientation only.
private array<class-string, list<ReflectionProperty>> $properties = []private list<string> $namespacesRelations§
Instantiated in 7
- new SqlSemantics\Platform\PostgreSql\Model\Validation\Publication::establish() packages/sql-semantics-postgres/src/Model/Validation/Publication.php:49
- new SqlSemantics\Platform\PostgreSql\Rules\Query\Facts\CommonTableFacts::uses() packages/sql-semantics-postgres/src/Rules/Query/Facts/CommonTableFacts.php:116
- new SqlSemantics\Platform\PostgreSql\Rules\Query\Facts\ModifyingCommonTables::check() packages/sql-semantics-postgres/src/Rules/Query/Facts/ModifyingCommonTables.php:40
- new SqlSemantics\Platform\PostgreSql\Rules\Query\Facts\QueryRoots::derive() packages/sql-semantics-postgres/src/Rules/Query/Facts/QueryRoots.php:51
- new SqlSemantics\Platform\PostgreSql\Rules\Table\Command\TriggerReferences::references() packages/sql-semantics-postgres/src/Rules/Table/Command/TriggerReferences.php:87
- new SqlSemantics\Platform\PostgreSql\Rules\Table\Definition\GeneratedColumns::referenced() packages/sql-semantics-postgres/src/Rules/Table/Definition/GeneratedColumns.php:68
- new SqlSemantics\Platform\PostgreSql\Semantics::inspect() packages/sql-semantics-postgres/src/Semantics.php:173
Method calls 8
- method-call SqlSemantics\Platform\PostgreSql\Model\Validation\Publication::establish() packages/sql-semantics-postgres/src/Model/Validation/Publication.php:50
- method-call SqlSemantics\Platform\PostgreSql\Model\Validation\Publication::establish() packages/sql-semantics-postgres/src/Model/Validation/Publication.php:60
- method-call SqlSemantics\Platform\PostgreSql\Rules\Query\Facts\CommonTableFacts::uses() packages/sql-semantics-postgres/src/Rules/Query/Facts/CommonTableFacts.php:116
- method-call SqlSemantics\Platform\PostgreSql\Rules\Query\Facts\ModifyingCommonTables::check() packages/sql-semantics-postgres/src/Rules/Query/Facts/ModifyingCommonTables.php:40
- method-call SqlSemantics\Platform\PostgreSql\Rules\Query\Facts\QueryRoots::derive() packages/sql-semantics-postgres/src/Rules/Query/Facts/QueryRoots.php:51
- method-call SqlSemantics\Platform\PostgreSql\Rules\Table\Command\TriggerReferences::references() packages/sql-semantics-postgres/src/Rules/Table/Command/TriggerReferences.php:87
- method-call SqlSemantics\Platform\PostgreSql\Rules\Table\Definition\GeneratedColumns::referenced() packages/sql-semantics-postgres/src/Rules/Table/Definition/GeneratedColumns.php:68
- method-call SqlSemantics\Platform\PostgreSql\Semantics::inspect() packages/sql-semantics-postgres/src/Semantics.php:174