ResultItem implements JsonSerializable, ArrayAccess
Table of Contents
Interfaces
- JsonSerializable
- ArrayAccess
Methods
- __construct() : mixed
- ResultItem constructor.
- addLink() : $this
- Adds link on searched item.
- getActions() : array<string|int, mixed>
- Returns actions.
- getAttributes() : array<string|int, mixed>
- Returns attributes.
- getId() : mixed
- Returns id.
- getLinks() : array<string|int, Uri>
- Returns links on searched item.
- getModule() : string
- Returns module which provides searched item.
- getShowLink() : Uri
- Returns link to show searched item.
- getSubTitle() : string
- Returns subtitle of searched item.
- getTitle() : string
- Returns title of searched item.
- getType() : string|null
- Returns type of element. For example: lead, deal, file, folder, etc.
- jsonSerialize() : mixed
- Specify data which should be serialized to JSON
- offsetExists() : bool
- Whether a offset exists
- offsetGet() : mixed
- Offset to retrieve
- offsetSet() : void
- Offset to set
- offsetUnset() : void
- Offset to unset
- setAttribute() : $this
- Sets value for attribute with name.
- setAttributes() : ResultItem
- Sets attributes.
- setId() : ResultItem
- Sets id.
- setLinks() : ResultItem
- Sets links on searched item.
- setModule() : ResultItem
- Sets module which provides searched item.
- setShowLink() : ResultItem
- Sets link to show searched item.
- setSubTitle() : ResultItem
- Sets subtitle of searched item.
- setTitle() : ResultItem
- Sets title of searched item.
- setType() : ResultItem
- Sets type of element. For example: lead, deal, file, folder, etc.
- unsetAttribute() : $this
- Deletes attribute by name.
Methods
__construct()
ResultItem constructor.
public
__construct(mixed $title, Uri|string $showLink[, null $id = null ]) : mixed
Parameters
- $title : mixed
- $showLink : Uri|string
- $id : null = null
addLink()
Adds link on searched item.
public
addLink(string $name, Uri|string $link) : $this
Parameters
- $name : string
-
Name of link.
- $link : Uri|string
-
Link.
Return values
$thisgetActions()
Returns actions.
public
getActions() : array<string|int, mixed>
It's reserved field and unused.
Return values
array<string|int, mixed>getAttributes()
Returns attributes.
public
getAttributes() : array<string|int, mixed>
Return values
array<string|int, mixed>getId()
Returns id.
public
getId() : mixed
getLinks()
Returns links on searched item.
public
getLinks() : array<string|int, Uri>
Return values
array<string|int, Uri>getModule()
Returns module which provides searched item.
public
getModule() : string
Return values
stringgetShowLink()
Returns link to show searched item.
public
getShowLink() : Uri
Return values
UrigetSubTitle()
Returns subtitle of searched item.
public
getSubTitle() : string
Subtitle is is unnecessary.
Return values
stringgetTitle()
Returns title of searched item.
public
getTitle() : string
Return values
stringgetType()
Returns type of element. For example: lead, deal, file, folder, etc.
public
getType() : string|null
Type is unnecessary.
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.
offsetExists()
Whether a offset exists
public
offsetExists(mixed $offset) : bool
Parameters
- $offset : mixed
-
An offset to check for.
Tags
Return values
bool —true on success or false on failure.
The return value will be casted to boolean if non-boolean was returned.
offsetGet()
Offset to retrieve
public
offsetGet(mixed $offset) : mixed
Parameters
- $offset : mixed
-
The offset to retrieve.
Tags
Attributes
- #[ReturnTypeWillChange]
Return values
mixed —Can return all value types.
offsetSet()
Offset to set
public
offsetSet(mixed $offset, mixed $value) : void
Parameters
- $offset : mixed
-
The offset to assign the value to.
- $value : mixed
-
The value to set.
Tags
offsetUnset()
Offset to unset
public
offsetUnset(mixed $offset) : void
Parameters
- $offset : mixed
-
The offset to unset.
Tags
setAttribute()
Sets value for attribute with name.
public
setAttribute(string $name, mixed $value) : $this
Parameters
- $name : string
- $value : mixed
Return values
$thissetAttributes()
Sets attributes.
public
setAttributes(array<string|int, mixed> $attributes) : ResultItem
Parameters
- $attributes : array<string|int, mixed>
Return values
ResultItemsetId()
Sets id.
public
setId(mixed $id) : ResultItem
Parameters
- $id : mixed
Return values
ResultItemsetLinks()
Sets links on searched item.
public
setLinks(array<string|int, Uri>|array<string|int, string> $links) : ResultItem
Should be associative array.
Parameters
- $links : array<string|int, Uri>|array<string|int, string>
-
Links.
Return values
ResultItemsetModule()
Sets module which provides searched item.
public
setModule(string $module) : ResultItem
Module is unnecessary and will generate automatically.
Parameters
- $module : string
-
Module id.
Return values
ResultItemsetShowLink()
Sets link to show searched item.
public
setShowLink(Uri $showLink) : ResultItem
Parameters
- $showLink : Uri
-
Show link.
Return values
ResultItemsetSubTitle()
Sets subtitle of searched item.
public
setSubTitle(string $subTitle) : ResultItem
Subtitle is is unnecessary.
Parameters
- $subTitle : string
-
Subtitle.
Return values
ResultItemsetTitle()
Sets title of searched item.
public
setTitle(string $title) : ResultItem
Parameters
- $title : string
-
Title.
Return values
ResultItemsetType()
Sets type of element. For example: lead, deal, file, folder, etc.
public
setType(string $type) : ResultItem
Type is unnecessary.
Parameters
- $type : string
Return values
ResultItemunsetAttribute()
Deletes attribute by name.
public
unsetAttribute(string $name) : $this
Parameters
- $name : string