IMetadataValueWrapper
extends
JsonSerializable
in
Model that store the value of a single metadata.
It stores the value, its type and the index status.
Tags
Table of Contents
Constants
- EDIT_FORBIDDEN = 0
- EDIT_REQ_OWNERSHIP = 1
- EDIT_REQ_READ_PERMISSION = 3
- EDIT_REQ_WRITE_PERMISSION = 2
- TYPE_ARRAY = 'array'
- TYPE_BOOL = 'bool'
- TYPE_FLOAT = 'float'
- TYPE_INT = 'int'
- TYPE_INT_LIST = 'int[]'
- TYPE_STRING = 'string'
- TYPE_STRING_LIST = 'string[]'
Methods
- __construct() : mixed
- Unless a call of import() to deserialize an object is expected, a valid value type is needed here.
- assertType() : self
- throws an exception if the type is not correctly set
- getEditPermission() : int
- get remote edit permission (Webdav PROPPATCH)
- getEtag() : string
- get stored etag value
- getType() : string
- returns the value type
- getValueAny() : string|int|float|bool|array<string|int, mixed>|array<string|int, string>|array<string|int, int>
- get stored value
- getValueArray() : array<string|int, mixed>
- get stored value
- getValueBool() : bool
- get stored value
- getValueFloat() : float
- get stored value
- getValueInt() : int
- get stored value
- getValueIntList() : array<string|int, int>
- get stored value
- getValueString() : string
- get stored value
- getValueStringList() : array<string|int, string>
- get stored value
- import() : self
- deserialize the object from a json
- isIndexed() : bool
- returns if value is an indexed value
- isType() : bool
- returns if the set value type is the one expected
- setEditPermission() : self
- set remote edit permission (Webdav PROPPATCH)
- setEtag() : self
- set etag value
- setIndexed() : self
- setValueArray() : self
- set an array value
- setValueBool() : self
- set a bool value
- setValueFloat() : self
- set a float value
- setValueInt() : self
- set a int value
- setValueIntList() : self
- set an int list value
- setValueString() : self
- set a string value
- setValueStringList() : self
- set a string list value
Constants
EDIT_FORBIDDEN
public
mixed
EDIT_FORBIDDEN
= 0
Tags
EDIT_REQ_OWNERSHIP
public
mixed
EDIT_REQ_OWNERSHIP
= 1
Tags
EDIT_REQ_READ_PERMISSION
public
mixed
EDIT_REQ_READ_PERMISSION
= 3
Tags
EDIT_REQ_WRITE_PERMISSION
public
mixed
EDIT_REQ_WRITE_PERMISSION
= 2
Tags
TYPE_ARRAY
public
mixed
TYPE_ARRAY
= 'array'
Tags
TYPE_BOOL
public
mixed
TYPE_BOOL
= 'bool'
Tags
TYPE_FLOAT
public
mixed
TYPE_FLOAT
= 'float'
Tags
TYPE_INT
public
mixed
TYPE_INT
= 'int'
Tags
TYPE_INT_LIST
public
mixed
TYPE_INT_LIST
= 'int[]'
Tags
TYPE_STRING
public
mixed
TYPE_STRING
= 'string'
Tags
TYPE_STRING_LIST
public
mixed
TYPE_STRING_LIST
= 'string[]'
Tags
Methods
__construct()
Unless a call of import() to deserialize an object is expected, a valid value type is needed here.
public
__construct(string $type) : mixed
Parameters
- $type : string
-
value type
Tags
assertType()
throws an exception if the type is not correctly set
public
assertType(string $type) : self
Parameters
- $type : string
-
value type
Tags
Return values
selfgetEditPermission()
get remote edit permission (Webdav PROPPATCH)
public
getEditPermission() : int
Tags
Return values
int —edit permission
getEtag()
get stored etag value
public
getEtag() : string
Tags
Return values
string —stored etag
getType()
returns the value type
public
getType() : string
Tags
Return values
string —value type
getValueAny()
get stored value
public
getValueAny() : string|int|float|bool|array<string|int, mixed>|array<string|int, string>|array<string|int, int>
Tags
Return values
string|int|float|bool|array<string|int, mixed>|array<string|int, string>|array<string|int, int> —set value
getValueArray()
get stored value
public
getValueArray() : array<string|int, mixed>
Tags
Return values
array<string|int, mixed> —set value
getValueBool()
get stored value
public
getValueBool() : bool
Tags
Return values
bool —set value
getValueFloat()
get stored value
public
getValueFloat() : float
Tags
Return values
float —set value
getValueInt()
get stored value
public
getValueInt() : int
Tags
Return values
int —set value
getValueIntList()
get stored value
public
getValueIntList() : array<string|int, int>
Tags
Return values
array<string|int, int> —set value
getValueString()
get stored value
public
getValueString() : string
Tags
Return values
string —set value
getValueStringList()
get stored value
public
getValueStringList() : array<string|int, string>
Tags
Return values
array<string|int, string> —set value
import()
deserialize the object from a json
public
import(array<string|int, mixed> $data) : self
Parameters
- $data : array<string|int, mixed>
-
serialized version of the object
Tags
Return values
selfisIndexed()
returns if value is an indexed value
public
isIndexed() : bool
Tags
Return values
bool —TRUE if value is an indexed value
isType()
returns if the set value type is the one expected
public
isType(string $type) : bool
Parameters
- $type : string
-
value type
Tags
Return values
boolsetEditPermission()
set remote edit permission (Webdav PROPPATCH)
public
setEditPermission(int $permission) : self
Parameters
- $permission : int
-
edit permission
Tags
Return values
selfsetEtag()
set etag value
public
setEtag(string $etag) : self
Parameters
- $etag : string
-
etag value
Tags
Return values
selfsetIndexed()
public
setIndexed(bool $indexed) : self
Parameters
- $indexed : bool
-
TRUE to set the stored value as an indexed value
Tags
Return values
selfsetValueArray()
set an array value
public
setValueArray(array<string|int, mixed> $value) : self
Parameters
- $value : array<string|int, mixed>
-
array to be set as value
Tags
Return values
selfsetValueBool()
set a bool value
public
setValueBool(bool $value) : self
Parameters
- $value : bool
-
bool to be set as value
Tags
Return values
selfsetValueFloat()
set a float value
public
setValueFloat(float $value) : self
Parameters
- $value : float
-
float to be set as value
Tags
Return values
selfsetValueInt()
set a int value
public
setValueInt(int $value) : self
Parameters
- $value : int
-
int to be set as value
Tags
Return values
selfsetValueIntList()
set an int list value
public
setValueIntList(array<string|int, int> $value) : self
Parameters
- $value : array<string|int, int>
-
int list to be set as value
Tags
Return values
selfsetValueString()
set a string value
public
setValueString(string $value) : self
Parameters
- $value : string
-
string to be set as value
Tags
Return values
selfsetValueStringList()
set a string list value
public
setValueStringList(array<string|int, string> $value) : self
Parameters
- $value : array<string|int, string>
-
string list to be set as value