Documentation

MapShape extends Shape
in package

Represents a map shape.

Table of Contents

$definition  : array<string|int, mixed>
$shapeMap  : ShapeMap
$key  : Shape
$value  : Shape
__construct()  : mixed
create()  : mixed
Get a concrete shape for the given definition.
getKey()  : Shape
getName()  : string
Get the name of the shape
getType()  : string
Get the type of the shape
getValue()  : Shape
offsetExists()  : mixed
offsetGet()  : mixed
offsetSet()  : mixed
offsetUnset()  : mixed
toArray()  : mixed
shapeAt()  : mixed
shapeFor()  : mixed

Properties

Methods

__construct()

public __construct(array<string|int, mixed> $definition, ShapeMap $shapeMap) : mixed
Parameters
$definition : array<string|int, mixed>
$shapeMap : ShapeMap
Return values
mixed

create()

Get a concrete shape for the given definition.

public static create(array<string|int, mixed> $definition, ShapeMap $shapeMap) : mixed
Parameters
$definition : array<string|int, mixed>
$shapeMap : ShapeMap
Tags
throws
RuntimeException

if the type is invalid

Return values
mixed

getName()

Get the name of the shape

public getName() : string
Return values
string

getType()

Get the type of the shape

public getType() : string
Return values
string

getValue()

public getValue() : Shape
Tags
throws
RuntimeException

if no value is specified

Return values
Shape

offsetExists()

public offsetExists(mixed $offset) : mixed
Parameters
$offset : mixed
Return values
mixed

offsetGet()

public offsetGet(mixed $offset) : mixed
Parameters
$offset : mixed
Return values
mixed

offsetSet()

public offsetSet(mixed $offset, mixed $value) : mixed
Parameters
$offset : mixed
$value : mixed
Return values
mixed

offsetUnset()

public offsetUnset(mixed $offset) : mixed
Parameters
$offset : mixed
Return values
mixed

shapeAt()

protected shapeAt(mixed $key) : mixed
Parameters
$key : mixed
Return values
mixed

shapeFor()

protected shapeFor(array<string|int, mixed> $definition) : mixed
Parameters
$definition : array<string|int, mixed>
Return values
mixed

Search results