Orpheus

FieldDescriptor
in package

The FieldDescriptor class

Tags
author

Florent Hazard contact@sowapps.com

Table of Contents

Properties

$args  : object
The field arguments
$default  : mixed
The field's default value
$name  : string
The field name
$nullable  : bool
Is this field nullable ?
$type  : string
The field type
$writable  : bool
Is this field writable ?

Methods

__construct()  : mixed
Constructor
__toString()  : string
Magic toString
arg()  : string|int|null
Get arg value for this field
buildIdField()  : static
Build ID field for an entity
getDefault()  : mixed
Get the default value (if this field is NULL)
getHtmlInputAttr()  : array<string|int, string>
Get the HTML input tag for this field
getType()  : AbstractTypeDescriptor
Get the type of the field
parseType()  : FieldDescriptor
Parse field type configuration from file string

Properties

Methods

__construct()

Constructor

public __construct(string $name, string $type, array<string|int, mixed> $rawArgs, mixed $default) : mixed
Parameters
$name : string
$type : string
$rawArgs : array<string|int, mixed>
$default : mixed

__toString()

Magic toString

public __toString() : string
Return values
string

arg()

Get arg value for this field

public arg(string $key) : string|int|null
Parameters
$key : string

The argument key

Return values
string|int|null

The argument value

buildIdField()

Build ID field for an entity

public static buildIdField(string $name) : static
Parameters
$name : string
Return values
static

getDefault()

Get the default value (if this field is NULL)

public getDefault() : mixed

getHtmlInputAttr()

Get the HTML input tag for this field

public getHtmlInputAttr() : array<string|int, string>
Tags
throws
Exception
Return values
array<string|int, string>

parseType()

Parse field type configuration from file string

public static parseType(string $fieldName, string|array<string|int, string> $desc) : FieldDescriptor
Parameters
$fieldName : string
$desc : string|array<string|int, string>
Tags
throws
Exception
Return values
FieldDescriptor

The parsed field descriptor


							
On this page

Search results