PHP Class Dumplie\Metadata\Schema\Field\DateTimeField

Inheritance: implements Dumplie\Metadata\Schema\FieldDefinition
Show file Open project: dumplie/dumplie

Public Methods

Method Description
__construct ( DateTimeInterface $default = null, boolean $nullable = true, array $options = [], string $format = 'c' )
defaultValue ( ) : DateTimeInterface | null
deserialize ( $serializedValue ) : DateTimeInterface
isNullable ( ) : boolean
isValid ( $value ) : boolean
name ( ) : string
options ( ) : array
serialize ( $value ) : string
type ( ) : Type

Method Details

__construct() public method

public __construct ( DateTimeInterface $default = null, boolean $nullable = true, array $options = [], string $format = 'c' )
$default DateTimeInterface
$nullable boolean
$options array
$format string

defaultValue() public method

public defaultValue ( ) : DateTimeInterface | null
return DateTimeInterface | null

deserialize() public method

public deserialize ( $serializedValue ) : DateTimeInterface
$serializedValue
return DateTimeInterface

isNullable() public method

public isNullable ( ) : boolean
return boolean

isValid() public method

public isValid ( $value ) : boolean
$value
return boolean

name() public method

public name ( ) : string
return string

options() public method

public options ( ) : array
return array

serialize() public method

public serialize ( $value ) : string
$value
return string

type() public method

public type ( ) : Type
return Dumplie\Metadata\Schema\Type