FieldDefinition
in package
Defines a field in a type
Tags
Table of Contents
Properties
- $allowsMultiple : bool
- $index : int
- $minimumValues : int
- $name : string
- $type : int
Methods
- __construct() : mixed
- Constructor
- allowsMultiple() : bool
- Determine whether the field allows multiple values
- assertDataValid() : bool
- Assert that a Type object is valid for this field
- getIndex() : int
- Get the index of the field in the containing type
- getMinimumValues() : int
- Get the minimum number of values for the field
- getName() : string
- Get the name of the field
- getType() : int
- Get the type of the field
Properties
$allowsMultiple
private
bool
$allowsMultiple
$index
private
int
$index
$minimumValues
private
int
$minimumValues
$name
private
string
$name
$type
private
int
$type
Methods
__construct()
Constructor
public
__construct(int $index, string $name, int $type, bool $allowsMultiple, int $minimumValues) : mixed
Parameters
- $index : int
- $name : string
- $type : int
- $allowsMultiple : bool
- $minimumValues : int
allowsMultiple()
Determine whether the field allows multiple values
public
allowsMultiple() : bool
Return values
boolassertDataValid()
Assert that a Type object is valid for this field
public
assertDataValid(Type $value) : bool
Parameters
- $value : Type
Return values
boolgetIndex()
Get the index of the field in the containing type
public
getIndex() : int
Return values
intgetMinimumValues()
Get the minimum number of values for the field
public
getMinimumValues() : int
Return values
intgetName()
Get the name of the field
public
getName() : string
Return values
stringgetType()
Get the type of the field
public
getType() : int