final class BuiltinCallModel
Restricted visibility: declared "@visibility root". Code outside that scope must not name this declaration.

What the PHP functions that shape query text do to the values they are given.

Queries are assembled with a small, stable set of string functions. Modelling those keeps a statement resolved that would otherwise become a gap the moment it passed through sprintf() or implode().

Methods§

public function supports(string $name): bool

Whether the standard registry models the function.

Parameters

$namestring

Returns

bool
Test cases 2
Calls 1
public function normalize(string $name): string

The case-insensitive fully qualified name.

Parameters

$namestring

Returns

string
Test cases 1
Calls 2
public function sprintf(list<Domain> $arguments, Domain $format): Domain

The result of sprintf(), resolved as far as the format and the arguments allow.

A format the analyzer knows only in part — "SELECT * FROM $table WHERE id IN (%s)" — still has conversions in the parts it knows, so those are filled in and the gaps are carried through, rather than the whole result becoming one gap because one piece of the format was not fixed.

Parameters

$argumentslist<Domain>
$formatDomain

Returns

Test cases 5
Called from 2
Calls 5
public function vsprintf(list<Domain> $arguments): Domain
public function splitFormat(string $format): list<string>

A format string split into literal runs and conversion specifications.

Parameters

$formatstring

Returns

list<string>
Test cases 2
Called from 1
Calls 3
public function arrayArgument(list<Domain> $arguments): ?ArrayTerm

The array argument of an implode call, whichever position it is written in.

Parameters

$argumentslist<Domain>

Returns

Test cases 1
Called from 1
public function fill(list<Domain> $arguments): ?Domain
public function repeat(list<Domain> $arguments): Domain
public function transform(string $function, list<Domain> $arguments): Domain

The result of a one-argument string transformation.

Parameters

$functionstring
$argumentslist<Domain>

Returns

Test cases 2
Called from 1
Calls 12
public function replace(list<Domain> $arguments): Domain

The result of str_replace(), resolved when every argument is a known string.

Parameters

$argumentslist<Domain>

Returns

Test cases 2
Called from 1
Calls 6

Private surface 1§

Implementation details, listed for orientation only.

private const STRING_RESULTS = ['json_encode' => true, 'addslashes' => true, 'htmlspecialchars' => true, 'str_…

Test cases 69§

Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.

Dedicated tests 43
Other tests reaching this symbol 26

Relations§

Instantiated in 1
Method calls 1