\Lqdt\OrmJson\Database\SchemaDatFieldTableSchema

These upgraded schema provides convenience to handle data types into JSON data

Summary

Methods
Properties
Constants
addJsonTypes()
addTransientJsonTypes()
setJsonTypes()
setTransientJsonTypes()
getJsonTypeMap()
clearJsonTypes()
clearTransientJsonTypes()
typeMap()
No public properties found
No constants found
_parseJsonTypes()
$_jsonTypeMap
$_transientJsonTypeMap
N/A
No private methods found
No private properties found
N/A

Properties

$_jsonTypeMap

$_jsonTypeMap :\Lqdt\OrmJson\Database\Schema\array<string,

Stores permanent datfield JSON data types or JSON types definition

Type

\Lqdt\OrmJson\Database\Schema\array

$_transientJsonTypeMap

$_transientJsonTypeMap :array

Stores transient datfield JSON types that will be removed after next call of typeMap()

Type

array

Methods

addJsonTypes()

addJsonTypes(array|string  $types,array|null  $type = null): void

Permanently register a JSON type(s) in schema. provided type(s) will be added to current styles In case of target conflict

Parameters

array|string $types

Datfield to type or array of [ => type definition>,...]

array|null $type

Type definition

addTransientJsonTypes()

addTransientJsonTypes(array|string  $types,array|null  $type = null): void

Register transient JSON type(s) in schema

These types will be removed after next call to DatFieldTableSchema::typeMap()

Parameters

array|string $types

Datfield to type or array of [ => type definition>,...]

array|null $type

Type definition

setJsonTypes()

setJsonTypes(array|string  $types,array|null  $type = null): void

Permanently register a JSON type(s) in schema. provided type(s) will replace currently stored JSON types

Parameters

array|string $types

Datfield to type or array of [ => type definition>,...]

array|null $type

Type definition

setTransientJsonTypes()

setTransientJsonTypes(array|string  $types,array|null  $type = null): void

Register transient JSON type(s) in schema

These types will be removed after next call to DatFieldTableSchema::typeMap()

Parameters

array|string $types

Datfield to type or array of [ => type definition>,...]

array|null $type

Type definition

getJsonTypeMap()

getJsonTypeMap()

clearJsonTypes()

clearJsonTypes(): self

Clears permanent JSON types

Returns

self

clearTransientJsonTypes()

clearTransientJsonTypes(): self

Clears transient JSON types

Returns

self

typeMap()

typeMap()

_parseJsonTypes()

_parseJsonTypes(array|string  $types,array|null  $type = null): array

Process a single or a set of json types and returns it as a suitable array to be stored as json types

Parameters

array|string $types

Datfield to type or array of [ => type definition>,...]

array|null $type

Type definition

Returns

array —

Processed JSON types