public static function createFromArray($name, array $data = [])
    {
        $type = parent::createFromArray($name, $data);
        \assert($type instanceof self);

        foreach ($data as $key => $value) {
            if ($key === 'format') {
                $type->setFormat($value);
            }
        }

        return $type;
    }
public static function createFromArray($name, array $data = [])
    {
        $type = parent::createFromArray($name, $data);
        \assert($type instanceof self);

        foreach ($data as $key => $value) {
            if ($key === 'format') {
                $type->setFormat($value);
            }
        }

        return $type;
    }
public static function createFromArray ( $ name , array $ data = [ ] ) { $ type = parent :: createFromArray ( $ name , $ data ) ; \ assert ( $ type instanceof self ) ; foreach ( $ data as $ key => $ value ) { if ( $ key === 'format' ) { $ type -> setFormat ( $ value ) ; } } return $ type ; }
Create a new DatetimeType from an array of data

@param string $name
@return DatetimeType
Create a new DatetimeType from an array of data