StructureShape
extends Shape
in package
Represents a structure shape and resolve member shape references.
Table of Contents
- $definition : array<string|int, mixed>
- $shapeMap : ShapeMap
- $members : array<string|int, Shape>
- __construct() : mixed
- create() : mixed
- Get a concrete shape for the given definition.
- getMember() : Shape
- Retrieve a member by name.
- getMembers() : array<string|int, Shape>
- Gets a list of all members
- getName() : string
- Get the name of the shape
- getType() : string
- Get the type of the shape
- hasMember() : bool
- Check if a specific member exists by name.
- offsetExists() : mixed
- offsetGet() : mixed
- offsetSet() : mixed
- offsetUnset() : mixed
- toArray() : mixed
- shapeAt() : mixed
- shapeFor() : mixed
- generateMembersHash() : mixed
Properties
$definition
protected
array<string|int, mixed>
$definition
$shapeMap
protected
ShapeMap
$shapeMap
$members
private
array<string|int, Shape>
$members
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
Return values
mixed —getMember()
Retrieve a member by name.
public
getMember(string $name) : Shape
Parameters
- $name : string
-
Name of the member to retrieve
Tags
Return values
Shape —getMembers()
Gets a list of all members
public
getMembers() : array<string|int, Shape>
Return values
array<string|int, Shape> —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 —hasMember()
Check if a specific member exists by name.
public
hasMember(string $name) : bool
Parameters
- $name : string
-
Name of the member to check
Return values
bool —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 —toArray()
public
toArray() : 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 —generateMembersHash()
private
generateMembersHash() : mixed