Guides

CallableAccessor
in package
implements SubNodeAccessor

Table of Contents

Interfaces

SubNodeAccessor
Describes one edge type of the node tree: where child nodes of an owner are stored, and how a child is replaced or removed. Nodes are immutable, so the modifying methods return the new owner.

Properties

$name  : string
$get  : callable(TOwner): TChild
$nullable  : bool
$set  : callable(TOwner, TChild): TOwner

Methods

__construct()  : mixed
items()  : Node[]
removeAt()  : Node
replaceAt()  : Node
assertKey()  : void
get()  : mixed
set()  : Node

Properties

Methods

__construct()

public __construct(string $name, callable(TOwner): TChild $get, callable(TOwner, TChild): TOwner $set[, bool $nullable = false ]) : mixed
Parameters
$name : string
$get : callable(TOwner): TChild
$set : callable(TOwner, TChild): TOwner
$nullable : bool = false

assertKey()

private assertKey(array<string|int, mixed> $value, int|string|null $key) : void
Parameters
$value : array<string|int, mixed>
$key : int|string|null
Tags
phpstan-assert

array-key $key

On this page

Search results