classPropertyTransfer
final class PropertyTransfer
Restricted visibility: declared "@visibility Deriver\Deriver\Evaluator" and "@visibility Deriver\Deriver\Evaluator\Execution". Code outside that scope must not name this declaration.
Applies property type, visibility, initialization, and implicit call semantics.
Properties§
public Evaluator $machineMethods§
public function __construct(public Evaluator $machine)Parameters
$machine | Evaluator | Shared evaluator for defaults and magic methods |
public function apply(
CallableGraph $caller,
Instruction $instruction,
State $state,
PropertySlot $slot,
): list<State>Transfers an operation on a previously evaluated property address.
Parameters
$caller | CallableGraph | Executing callable |
$instruction | Instruction | Read or mutation |
$state | State | Current path |
$slot | PropertySlot | Property declaration context |
Returns
list<State> Normal and exceptional alternativesCalled from 3
- method-call Deriver\Deriver\Evaluator\Execution\InstructionTransfer::storage() packages/deriver/src/Deriver/Evaluator/Execution/InstructionTransfer.php:190
- method-call Deriver\Deriver\Evaluator\Execution\Transfer\PropertyTransfer::initialize() packages/deriver/src/Deriver/Evaluator/Execution/Transfer/PropertyTransfer.php:159
- method-call Deriver\Deriver\Evaluator\Execution\Transfer\PropertyTransfer::initialize() packages/deriver/src/Deriver/Evaluator/Execution/Transfer/PropertyTransfer.php:171
Calls 14
- method-call PropertyAccessCheck::apply() line 45
- new PropertyAccessCheck line 45
- method-call PropertyLookup::accessible() line 49
- new PropertyLookup line 49
- method-call PropertyMagic::apply() line 51
- new PropertyMagic line 51
- static-call Term::constant() line 57
- method-call PropertyTransfer::error() line 61
- class-const TermKind::Array() line 63
- method-call Path::chain() line 64
- new Path line 64
- method-call PropertyTransfer::initialize() line 65
- method-call PropertyTransfer::uncertain() line 67
- method-call PropertyTransfer::transfer() line 67
public function transfer(
CallableGraph $caller,
Instruction $instruction,
State $state,
PropertySlot $slot,
Location $address,
): list<State>Applies an operation after resolving access, default initialization, and receiver checks.
Parameters
$caller | CallableGraph | Executing graph |
$instruction | Instruction | Storage operation |
$state | State | Accessible path |
$slot | PropertySlot | Property context |
$address | Location | Property storage |
Returns
list<State> Normal or exceptional alternativesCalled from 2
- method-call Deriver\Deriver\Evaluator\Execution\Transfer\PropertyTransfer::apply() packages/deriver/src/Deriver/Evaluator/Execution/Transfer/PropertyTransfer.php:67
- method-call Deriver\Deriver\Evaluator\Execution\Transfer\PropertyTransfer::uncertain() packages/deriver/src/Deriver/Evaluator/Execution/Transfer/PropertyTransfer.php:210
Calls 13
- method-call Transfer::apply() line 82
- new Transfer line 82
- class-const TermKind::Uninitialized() line 85
- method-call PropertyTransfer::error() line 86
- method-call PropertyReference::read() line 89
- new PropertyReference line 89
- method-call PropertyReference::bind() line 92
- method-call PropertyReference::increment() line 95
- method-call PropertyTransfer::write() line 98
- function-call
strcasecmpline 100 - function-call
in_arrayline 101 - method-call MemoryStep::evaluate() line 104
- new MemoryStep line 104
public function write(
CallableGraph $caller,
Instruction $instruction,
State $state,
PropertySlot $slot,
Location $address,
): list<State>Validates a property assignment before making its state change visible.
Parameters
$caller | CallableGraph | Executing callable |
$instruction | Instruction | Assignment |
$state | State | Input state |
$slot | PropertySlot | Declaration and scope |
$address | Location | Property storage |
Returns
list<State> Assignment result and possible type errorTest cases 3
Called from 2
- method-call Deriver\Deriver\Evaluator\Execution\Transfer\PropertyReference::increment() packages/deriver/src/Deriver/Evaluator/Execution/Transfer/PropertyReference.php:110
- method-call Deriver\Deriver\Evaluator\Execution\Transfer\PropertyTransfer::transfer() packages/deriver/src/Deriver/Evaluator/Execution/Transfer/PropertyTransfer.php:98
Calls 14
- method-call PropertyTransfer::error() line 121
- class-const TermKind::Uninitialized() line 123
- function-call
strcasecmpline 125 - method-call State::value() line 128
- method-call TypeBinding::scope() line 129
- new TypeBinding line 129
- method-call ReferenceConstraint::find() line 130
- new ReferenceConstraint line 130
- method-call ReferenceAssignment::check() line 131
- new ReferenceAssignment line 131
- method-call TypeBinding::report() line 132
- method-call State::fork() line 133
- new Completion line 134
- class-const CompletionKind::Throw() line 134
public function initialize(
CallableGraph $caller,
Instruction $instruction,
State $state,
PropertySlot $slot,
Location $address,
): list<State>Evaluates a static property's default once in each memory state.
Parameters
$caller | CallableGraph | Executing callable |
$instruction | Instruction | Pending property access |
$state | State | Uninitialized static storage |
$slot | PropertySlot | Captured declaration |
$address | Location | Static property address |
Returns
list<State> Initialized access resultsCalled from 1
Calls 9
- static-call Term::constant() line 156
- new Term line 156
- class-const TermKind::Uninitialized() line 156
- method-call PropertyTransfer::apply() line 159
- method-call Evaluator::run() line 162
- new State line 162
- method-call State::fork() line 163
- class-const CompletionKind::Throw() line 165
- function-call
array_pushline 171
Produces an exceptional path without performing the invalid write.
Parameters
$state | State | Input path |
$class | string | Throwable type |
Returns
State Exceptional stateTest cases 1
Called from 8
- method-call Deriver\Deriver\Evaluator\Execution\Transfer\PropertyReference::read() packages/deriver/src/Deriver/Evaluator/Execution/Transfer/PropertyReference.php:68
- method-call Deriver\Deriver\Evaluator\Execution\Transfer\PropertyReference::read() packages/deriver/src/Deriver/Evaluator/Execution/Transfer/PropertyReference.php:75
- method-call Deriver\Deriver\Evaluator\Execution\Transfer\PropertyReference::increment() packages/deriver/src/Deriver/Evaluator/Execution/Transfer/PropertyReference.php:100
- method-call Deriver\Deriver\Evaluator\Execution\Transfer\PropertyTransfer::apply() packages/deriver/src/Deriver/Evaluator/Execution/Transfer/PropertyTransfer.php:61
- method-call Deriver\Deriver\Evaluator\Execution\Transfer\PropertyTransfer::transfer() packages/deriver/src/Deriver/Evaluator/Execution/Transfer/PropertyTransfer.php:86
- method-call Deriver\Deriver\Evaluator\Execution\Transfer\PropertyTransfer::transfer() packages/deriver/src/Deriver/Evaluator/Execution/Transfer/PropertyTransfer.php:102
- method-call Deriver\Deriver\Evaluator\Execution\Transfer\PropertyTransfer::write() packages/deriver/src/Deriver/Evaluator/Execution/Transfer/PropertyTransfer.php:121
- method-call Deriver\Deriver\Evaluator\Execution\Transfer\PropertyTransfer::write() packages/deriver/src/Deriver/Evaluator/Execution/Transfer/PropertyTransfer.php:126
Calls 4
- new Completion line 184
- class-const CompletionKind::Throw() line 184
- new Term line 184
- class-const TermKind::Throwable() line 184
public function uncertain(
CallableGraph $caller,
Instruction $instruction,
State $state,
PropertySlot $slot,
Location $address,
): list<State>|nullRetains the possibility that an unknown call unset a declared property.
Parameters
$caller | CallableGraph | Executing graph |
$instruction | Instruction | Property operation |
$state | State | Input path |
$slot | PropertySlot | Property contract |
$address | Location | Property storage |
Returns
list<State>|null Initialized and absent alternatives, or a known presenceTest cases 2
Called from 1
Calls 7
- class-const TermKind::ArrayRead() line 200
- class-const TermKind::Opaque() line 200
- method-call State::fork() line 204
- new Term line 205
- class-const TermKind::Uninitialized() line 205
- function-call
is_stringline 208 - method-call PropertyTransfer::transfer() line 210
Test cases 42§
Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.
Dedicated tests 6
PropertyTransferTest::testErrorRetainsTheUnchangedMemorycallsPropertyTransferTest::testUncertainKeepsKnownPresenceWithoutForkingcallsPropertyTransferTest::testUncertainPreservesPresentAndAbsentPropertyStatescallsPropertyTransferTest::testWriteConsumesOnlyTheSuccessfulReadonlyCloneOpportunitycallsPropertyTransferTest::testWritePreservesBothTypeOutcomesAndTheirIndependentMemorycallsPropertyTransferTest::testWriteRejectsAnAbsentDeclarationWithoutTouchingStoragecalls
Other tests reaching this symbol 36
FrontierTestcallsAllocationTestcallsCallExecutorTestcallsBindingTestcallsMethodInvocationTestcallsInvocationTestcallsParameterBindingTestcallsArgumentsTestcallsUnpackTestcallsUnknownCallTestcallsAlternativeTestcallsCollectionCallsTestcallsHavocTestcallsInstructionTransferTestcallsProtocolTestcallsTransferTestcallsConversionsTestcallsCountableCallsTestcallsStateTestcallsInvocationTestcallsConstantTransferTestcallsObjectAccessTestcallsPropertyAccessCheckTestcallsPropertyMagicTestcallsPropertyReferenceTestcallsReferenceAssignmentTestcallsQueryExecutionTestcallsResultAssessmentTestcallsAssignmentLoweringTestcallsConditionalLoweringTestcallsDestructuringLoweringTestcallsIndexerTestcallsClassDeclarationTestcallsPropertyDeclarationTestcallsDispatchTestcallsLowererTestcalls
Relations§
Instantiated in 5
- new Deriver\Deriver\Evaluator\Execution\InstructionTransfer::storage() packages/deriver/src/Deriver/Evaluator/Execution/InstructionTransfer.php:190
- new Deriver\Deriver\Evaluator\Execution\Transfer\PropertyReference::read() packages/deriver/src/Deriver/Evaluator/Execution/Transfer/PropertyReference.php:68
- new Deriver\Deriver\Evaluator\Execution\Transfer\PropertyReference::read() packages/deriver/src/Deriver/Evaluator/Execution/Transfer/PropertyReference.php:75
- new Deriver\Deriver\Evaluator\Execution\Transfer\PropertyReference::increment() packages/deriver/src/Deriver/Evaluator/Execution/Transfer/PropertyReference.php:100
- new Deriver\Deriver\Evaluator\Execution\Transfer\PropertyReference::increment() packages/deriver/src/Deriver/Evaluator/Execution/Transfer/PropertyReference.php:110
Method calls 5
- method-call Deriver\Deriver\Evaluator\Execution\InstructionTransfer::storage() packages/deriver/src/Deriver/Evaluator/Execution/InstructionTransfer.php:190
- method-call Deriver\Deriver\Evaluator\Execution\Transfer\PropertyReference::read() packages/deriver/src/Deriver/Evaluator/Execution/Transfer/PropertyReference.php:68
- method-call Deriver\Deriver\Evaluator\Execution\Transfer\PropertyReference::read() packages/deriver/src/Deriver/Evaluator/Execution/Transfer/PropertyReference.php:75
- method-call Deriver\Deriver\Evaluator\Execution\Transfer\PropertyReference::increment() packages/deriver/src/Deriver/Evaluator/Execution/Transfer/PropertyReference.php:100
- method-call Deriver\Deriver\Evaluator\Execution\Transfer\PropertyReference::increment() packages/deriver/src/Deriver/Evaluator/Execution/Transfer/PropertyReference.php:110