StructureShape
extends Shape
in package
Represents a structure shape and resolve member shape references.
Table of Contents
Methods
- __construct() : mixed
- create() : mixed
- Get a concrete shape for the given definition.
- getContextParam() : mixed
- Get a context param 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() : bool
- offsetGet() : mixed|null
- offsetSet() : void
- offsetUnset() : void
- toArray() : mixed
Methods
__construct()
public
__construct(array<string|int, mixed> $definition, ShapeMap $shapeMap) : mixed
Parameters
- $definition : array<string|int, mixed>
- $shapeMap : ShapeMap
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
getContextParam()
Get a context param definition.
public
getContextParam() : mixed
getMember()
Retrieve a member by name.
public
getMember(string $name) : Shape
Parameters
- $name : string
-
Name of the member to retrieve
Tags
Return values
ShapegetMembers()
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
stringgetType()
Get the type of the shape
public
getType() : string
Return values
stringhasMember()
Check if a specific member exists by name.
public
hasMember(string $name) : bool
Parameters
- $name : string
-
Name of the member to check
Return values
booloffsetExists()
public
offsetExists(mixed $offset) : bool
Parameters
- $offset : mixed
Return values
booloffsetGet()
public
offsetGet(mixed $offset) : mixed|null
Parameters
- $offset : mixed
Return values
mixed|nulloffsetSet()
public
offsetSet(mixed $offset, mixed $value) : void
Parameters
- $offset : mixed
- $value : mixed
offsetUnset()
public
offsetUnset(mixed $offset) : void
Parameters
- $offset : mixed
toArray()
public
toArray() : mixed