CodeLabel
in package
implements
JsonSerializable
Table of Contents
Interfaces
- JsonSerializable
Properties
- $code : int
- $label : string
- $translationKey : string|null
Methods
- __construct() : mixed
- getCode() : int
- getLabel() : string
- getTranslationKey() : string|null
- jsonSerialize() : mixed
- Specify data which should be serialized to JSON
- setCode() : void
- setLabel() : void
- setTranslationKey() : void
Properties
$code
private
int
$code
$label
private
string
$label
$translationKey
private
string|null
$translationKey
Methods
__construct()
public
__construct(int $code, string $label[, string|null $translationKey = null ]) : mixed
Parameters
- $code : int
- $label : string
- $translationKey : string|null = null
getCode()
public
getCode() : int
Return values
intgetLabel()
public
getLabel() : string
Return values
stringgetTranslationKey()
public
getTranslationKey() : string|null
Return values
string|nulljsonSerialize()
Specify data which should be serialized to JSON
public
jsonSerialize() : mixed
Tags
Return values
mixed —data which can be serialized by json_encode, which is a value of any type other than a resource.
setCode()
public
setCode(int $code) : void
Parameters
- $code : int
setLabel()
public
setLabel(string $label) : void
Parameters
- $label : string
setTranslationKey()
public
setTranslationKey(string|null $translationKey) : void
Parameters
- $translationKey : string|null