Flow PHP

ReplaceNodes implements Rewrite

Read onlyYes
FinalYes

Interfaces

Rewrite

Methods

__construct()  : mixed
Targets are found by the identity they have before the rewrite.
of()  : Node
The replacement for $original, given as $rebuilt over its rewritten children; $rebuilt itself when nothing changes.
one()  : self

Methods

__construct()

Targets are found by the identity they have before the rewrite.

public __construct(SplObjectStorage<Node, Node> $replacements[, array<int, Node> $removals = [] ]) : mixed
Parameters
$replacements : SplObjectStorage<Node, Node>

target => replacement, which takes the target's rewritten children

$removals : array<int, Node> = []

nodes of one child, each giving way to its rewritten child

of()

The replacement for $original, given as $rebuilt over its rewritten children; $rebuilt itself when nothing changes.

public of(Node $original, Node $rebuilt) : Node

Apply it to a plan through LogicalPlan::transformUp(): its memo rewrites a node every consumer shares exactly once, so the shared prefix stays shared. It never reaches into a join's right side.

Parameters
$original : Node
$rebuilt : Node
Return values
Node
On this page

Search results