\Orpheus\EntityDescriptorTypeInteger

Entity Type Integer class

Summary

Methods
Properties
Constants
parseArgs()
validate()
getMaxLengthOf()
getHTMLInputAttr()
htmlInputAttr()
getName()
isWritable()
isNullable()
emptyIsNull()
preFormat()
format()
parseValue()
No public properties found
No constants found
No protected methods found
$name
$writable
$nullable
N/A
No private methods found
No private properties found
N/A

Properties

$name

$name : string

The type's name

Type

string

$writable

$writable : boolean

Is this type writable ?

Type

boolean

$nullable

$nullable : boolean

Is this type nullable ?

Type

boolean

Methods

parseArgs()

parseArgs(array<mixed,string>  $fargs) : \Orpheus\EntityDescriptor\stdClass

Parse args from field declaration

Parameters

array<mixed,string> $fargs

Arguments

Returns

\Orpheus\EntityDescriptor\stdClass

getMaxLengthOf()

getMaxLengthOf(integer  $number, integer  $decimals) : integer

Get the max length of number

Parameters

integer $number
integer $decimals

Returns

integer

getHTMLInputAttr()

getHTMLInputAttr(\Orpheus\EntityDescriptor\FieldDescriptor  $field) : array<mixed,string>

Get the html input attributes array for the given Field descriptor

Parameters

\Orpheus\EntityDescriptor\FieldDescriptor $field

Returns

array<mixed,string>

htmlInputAttr()

htmlInputAttr(array  $args) : string

Get the html input attributes string for the given args

Parameters

array $args

Returns

string

getName()

getName() : string

Get the type name

Returns

string —

the type name

isWritable()

isWritable() : boolean

Get true if field is writable

Returns

boolean

isNullable()

isNullable() : boolean

Get true if field is nullable

Returns

boolean

emptyIsNull()

emptyIsNull(\Orpheus\EntityDescriptor\FieldDescriptor  $field) : boolean

Get true if we consider null an empty input string

Parameters

\Orpheus\EntityDescriptor\FieldDescriptor $field

Returns

boolean

preFormat()

preFormat(\Orpheus\EntityDescriptor\FieldDescriptor  $field, string  $value, array  $input, \Orpheus\EntityDescriptor\PermanentEntity  $ref) 

Format value before being validated

Parameters

\Orpheus\EntityDescriptor\FieldDescriptor $field

The field to format

string $value

The field value to format

array $input

The input to validate

\Orpheus\EntityDescriptor\PermanentEntity $ref

The object to update, may be null

format()

format(\Orpheus\EntityDescriptor\FieldDescriptor  $field, string  $value) 

{@inheritDoc}

Parameters

\Orpheus\EntityDescriptor\FieldDescriptor $field

The field to parse

string $value

The field value to parse

parseValue()

parseValue(\Orpheus\EntityDescriptor\FieldDescriptor  $field, string  $value) : string

Parse the value from SQL scalar to PHP type

Parameters

\Orpheus\EntityDescriptor\FieldDescriptor $field

The field to parse

string $value

The field value to parse

Returns

string —

The parse $value