Message extends Base
Class Message
Table of Contents
Constants
- SEARCH_FIELD_NAME = 'SEARCH_CONTENT'
Methods
- __construct() : mixed
- Base constructor.
- addError() : mixed
- Add error.
- clearErrors() : mixed
- Clear errors.
- copyConfiguration() : Result|null
- Copy configuration.
- create() : static
- Create instance.
- get() : mixed
- Get data value by key.
- getCode() : string|null
- Get code.
- getData() : mixed
- Get data.
- getDataClass() : mixed
- Get data class.
- getErrorCollection() : ErrorCollection
- Get error collection.
- getErrorMessages() : array<string|int, mixed>
- Get error messages.
- getErrors() : array<string|int, mixed>
- Get errors.
- getFields() : array<string|int, mixed>
- Get fields.
- getId() : int
- Get ID.
- getSearchBuilder() : null|Builder
- Get data class.
- getUser() : mixed
- Get user.
- getUtm() : array<string|int, mixed>
- Get fields.
- hasErrors() : bool
- Return true if it have errors.
- load() : bool
- Load.
- loadByArray() : bool
- Load by array.
- loadConfiguration() : Configuration
- Load configuration.
- mergeData() : $this
- Merge data.
- removeById() : Result
- Remove by ID.
- removeConfiguration() : bool
- Remove configuration.
- save() : mixed
- Save.
- saveConfiguration() : Result
- Save configuration.
- saveSearchIndex() : bool
- Save search index.
- set() : $this
- Set data value by key.
- setCode() : $this
- Set code.
- setData() : $this
- Set data.
- setFields() : $this
- Set fields.
- setId() : $this
- Set ID.
- setUser() : mixed
- Set user.
- setUtm() : $this
- Set fields.
- unsetByKey() : $this
- Unset data value by key.
Constants
SEARCH_FIELD_NAME
public
mixed
SEARCH_FIELD_NAME
= 'SEARCH_CONTENT'
Methods
__construct()
Base constructor.
public
__construct([int|null $id = null ]) : mixed
Parameters
- $id : int|null = null
-
ID.
addError()
Add error.
public
addError(string $message[, string|null $code = null ]) : mixed
Parameters
- $message : string
-
Message text.
- $code : string|null = null
-
Code.
clearErrors()
Clear errors.
public
clearErrors() : mixed
copyConfiguration()
Copy configuration.
public
copyConfiguration(int|string|null $id) : Result|null
Parameters
- $id : int|string|null
-
ID.
Return values
Result|nullcreate()
Create instance.
public
static create([int|null $id = null ]) : static
Parameters
- $id : int|null = null
-
ID.
Return values
staticget()
Get data value by key.
public
get(string $key[, mixed|null $defaultValue = null ]) : mixed
Parameters
- $key : string
-
Key.
- $defaultValue : mixed|null = null
-
Default value.
getCode()
Get code.
public
getCode() : string|null
Return values
string|nullgetData()
Get data.
public
getData() : mixed
getDataClass()
Get data class.
public
static getDataClass() : mixed
Tags
getErrorCollection()
Get error collection.
public
getErrorCollection() : ErrorCollection
Return values
ErrorCollectiongetErrorMessages()
Get error messages.
public
getErrorMessages() : array<string|int, mixed>
Return values
array<string|int, mixed>getErrors()
Get errors.
public
getErrors() : array<string|int, mixed>
Return values
array<string|int, mixed>getFields()
Get fields.
public
getFields() : array<string|int, mixed>
Return values
array<string|int, mixed>getId()
Get ID.
public
getId() : int
Return values
intgetSearchBuilder()
Get data class.
public
static getSearchBuilder() : null|Builder
Return values
null|BuildergetUser()
Get user.
public
getUser() : mixed
Tags
getUtm()
Get fields.
public
getUtm() : array<string|int, mixed>
Return values
array<string|int, mixed>hasErrors()
Return true if it have errors.
public
hasErrors() : bool
Return values
boolload()
Load.
public
load(int $id) : bool
Parameters
- $id : int
-
ID.
Return values
boolloadByArray()
Load by array.
public
loadByArray(array<string|int, mixed> $data) : bool
Parameters
- $data : array<string|int, mixed>
-
Data.
Return values
boolloadConfiguration()
Load configuration.
public
loadConfiguration([int|null $id = null ][, Configuration $configuration = null ]) : Configuration
Parameters
- $id : int|null = null
-
ID.
- $configuration : Configuration = null
-
Configuration.
Return values
ConfigurationmergeData()
Merge data.
public
mergeData(array<string|int, mixed> $data) : $this
Parameters
- $data : array<string|int, mixed>
-
Data.
Return values
$thisremoveById()
Remove by ID.
public
static removeById(int $id) : Result
Parameters
- $id : int
-
ID.
Return values
ResultremoveConfiguration()
Remove configuration.
public
removeConfiguration(int $id) : bool
Parameters
- $id : int
-
ID.
Return values
boolsave()
Save.
public
save() : mixed
saveConfiguration()
Save configuration.
public
saveConfiguration(Configuration $configuration) : Result
Parameters
- $configuration : Configuration
-
Configuration.
Return values
ResultsaveSearchIndex()
Save search index.
public
saveSearchIndex() : bool
Return values
boolset()
Set data value by key.
public
set(string $key, mixed $value) : $this
Parameters
- $key : string
-
Key.
- $value : mixed
-
Value.
Return values
$thissetCode()
Set code.
public
setCode(string $code) : $this
Parameters
- $code : string
-
Code.
Return values
$thissetData()
Set data.
public
setData(array<string|int, mixed> $data) : $this
Parameters
- $data : array<string|int, mixed>
-
Data.
Return values
$thissetFields()
Set fields.
public
setFields(array<string|int, mixed> $fields) : $this
Parameters
- $fields : array<string|int, mixed>
-
Fields.
Return values
$thissetId()
Set ID.
public
setId(int $id) : $this
Parameters
- $id : int
-
ID.
Return values
$thissetUser()
Set user.
public
setUser([User|null $user = null ]) : mixed
Parameters
- $user : User|null = null
-
User.
Tags
setUtm()
Set fields.
public
setUtm(array<string|int, mixed> $utm) : $this
Parameters
- $utm : array<string|int, mixed>
Return values
$thisunsetByKey()
Unset data value by key.
public
unsetByKey(string $key) : $this
Parameters
- $key : string
-
Key.