\Orpheus\EntityDescriptorFieldDescriptor

The FieldDescriptor class

Summary

Methods
Properties
Constants
__construct()
__toString()
arg()
getHTMLInputAttr()
getType()
getDefault()
parseType()
buildIDField()
$name
$type
$args
$default
$writable
$nullable
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
No private properties found
N/A

Properties

$name

$name : string

The field name

Type

string

$type

$type : string

The field type

Type

string

$args

$args : array

The field arguments

Type

array

$default

$default : mixed

The field's default value

Type

mixed

$writable

$writable : boolean

Is this field writable ?

Type

boolean

$nullable

$nullable : boolean

Is this field nullable ?

Type

boolean

Methods

__construct()

__construct(string  $name, string  $type) 

Constructor

Parameters

string $name
string $type

__toString()

__toString() : string

Magic toString

Returns

string

arg()

arg(  $key) : string|integer|NULL

Get arg value for this field

Parameters

$key

string The argument key

Returns

string|integer|NULL —

The argument value

getHTMLInputAttr()

getHTMLInputAttr() : string

Get the HTML input tag for this field

Returns

string

getDefault()

getDefault() : string|integer

Get the default value (if this field is NULL)

Returns

string|integer

parseType()

parseType(string  $fieldName, string|array<mixed,string>  $desc) : \Orpheus\EntityDescriptor\FieldDescriptor

Parse field type configuration from file string

Parameters

string $fieldName
string|array<mixed,string> $desc

Returns

\Orpheus\EntityDescriptor\FieldDescriptor

The parsed field descriptor