classEntryProperties
final class EntryProperties
Restricted visibility: declared "@visibility Deriver\Deriver\Evaluator" and "@visibility Deriver\Deriver\Evaluator\Execution" and "@visibility Deriver\Deriver\Execution". Code outside that scope must not name this declaration.
Installs explicitly supplied receiver property values as an entry object's initial state.
Properties§
public Context $contextMethods§
public function apply(
CallableGraph $body,
Term|null $receiver,
array<string, Term> $properties,
State $state,
): voidWrites each supplied value into the receiver's declared storage slot. Unsupplied properties keep the symbolic, declared-type state of an external object.
Parameters
$body | CallableGraph | Entry callable |
$receiver | Term|null | Bound receiver, or null for static and function entries |
$properties | array<string, Term> | Supplied values keyed by property name |
$state | State | Entry state before argument binding |
Throws
InvalidInputException If there is no receiver, a property is not a declared instance property, or a value violates its declared typeTest cases 5
EntryPropertiesTest::testApplyKeepsASymbolicValueWithinTheDeclaredTypecallsEntryPropertiesTest::testApplyRejectsPropertiesNoPhpObjectCanHavecallsEntryPropertiesTest::testApplyResolvesTheClassOfAnExplicitReceiverIdentitycallsEntryPropertiesTest::testApplyWithoutPropertiesLeavesTheEntryStateUntouchedcallsEntryPropertiesTest::testApplyWritesDeclaredSlotsAndKeepsTheRecordOpenForUnsuppliedPropertiescalls
Called from 1
Calls 13
- function-call
is_stringline 47 - new InvalidInputException line 48
- function-call
ltrimline 51 - static-call Term::array() line 53
- method-call PropertyLookup::find() line 55
- new PropertyLookup line 55
- method-call TypeBinding::scope() line 59
- new TypeBinding line 59
- method-call ReferenceAssignment::check() line 60
- new ReferenceAssignment line 60
- method-call ObjectAccess::slot() line 64
- new ObjectAccess line 64
- new Location line 66
Test cases 6§
Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.
Dedicated tests 5
EntryPropertiesTest::testApplyKeepsASymbolicValueWithinTheDeclaredTypecallsEntryPropertiesTest::testApplyRejectsPropertiesNoPhpObjectCanHavecallsEntryPropertiesTest::testApplyResolvesTheClassOfAnExplicitReceiverIdentitycallsEntryPropertiesTest::testApplyWithoutPropertiesLeavesTheEntryStateUntouchedcallsEntryPropertiesTest::testApplyWritesDeclaredSlotsAndKeepsTheRecordOpenForUnsuppliedPropertiescalls
Other tests reaching this symbol 1
QueryExecutionTestcalls