Indexed extends Entity implements IMappableEntity, JsonSerializable Uses Entity_ID, Entity_Assignable, Entity_Database_Prefix

Represents an indexed record in the database.

Tags
author

Barn2 Plugins support@barn2.com

license

GPL-3.0

copyright

Barn2 Media Ltd

Interfaces, Classes and Traits

IMappableEntity
JsonSerializable

Table of Contents

assign()  : self
Assign mass data to entity.
create()  : Indexed
Create a new indexed record.
delete_all_by_post_id()  : void
Delete all indexed records for a given post.
get_database_prefix()  : string
Retrieve database prefix.
get_depth()  : int
Get the depth of the indexed record.
get_facet_display_value()  : string
Get the display value of the filter that the record belongs to.
get_facet_name()  : string
Get the name of the filter that the record belongs to.
get_facet_value()  : string
Get the value of the filter that the record belongs to.
get_filter_id()  : string
Get the filter ID of the indexed record.
get_id()  : int
Retrieve ID of the Entity Alias of id()
get_parent_id()  : int
Get the parent ID of the indexed record.
get_post_id()  : int
Get the post ID of the indexed record.
get_term_id()  : int
Get the term ID of the indexed record.
get_variation_id()  : string
Get the variation ID of the indexed record.
id()  : int
Retrieve ID of the Entity
jsonSerialize()  : array<string|int, mixed>
Get the JSON representation of the indexed record.
mapEntity()  : mixed
set_id()  : void
Set ID of the Entity

Methods

assign()

Assign mass data to entity.

public assign(array<string|int, mixed> $data) : self
Parameters
$data : array<string|int, mixed>
Return values
self

create()

Create a new indexed record.

public static create(array<string|int, mixed> $params) : Indexed
Parameters
$params : array<string|int, mixed>
Return values
Indexed

delete_all_by_post_id()

Delete all indexed records for a given post.

public static delete_all_by_post_id(int $post_id) : void
Parameters
$post_id : int
Return values
void

get_database_prefix()

Retrieve database prefix.

public get_database_prefix() : string
Return values
string

get_depth()

Get the depth of the indexed record.

public get_depth() : int

This is the depth of the term in the taxonomy hierarchy.

Return values
int

get_facet_display_value()

Get the display value of the filter that the record belongs to.

public get_facet_display_value() : string
Return values
string

get_facet_name()

Get the name of the filter that the record belongs to.

public get_facet_name() : string
Return values
string

get_facet_value()

Get the value of the filter that the record belongs to.

public get_facet_value() : string
Return values
string

get_filter_id()

Get the filter ID of the indexed record.

public get_filter_id() : string

This is the ID of the filter that the record belongs to.

Return values
string

get_id()

Retrieve ID of the Entity Alias of id()

public get_id() : int
Return values
int

get_parent_id()

Get the parent ID of the indexed record.

public get_parent_id() : int

This is the ID of the parent term in the taxonomy hierarchy.

Return values
int

get_post_id()

Get the post ID of the indexed record.

public get_post_id() : int
Return values
int

get_term_id()

Get the term ID of the indexed record.

public get_term_id() : int

This is the ID of the term that the record belongs to.

Return values
int

get_variation_id()

Get the variation ID of the indexed record.

public get_variation_id() : string

This is the ID of the product variation that the record belongs to.

Return values
string

id()

Retrieve ID of the Entity

public id() : int
Return values
int

jsonSerialize()

Get the JSON representation of the indexed record.

public jsonSerialize() : array<string|int, mixed>
Return values
array<string|int, mixed>

mapEntity()

public static mapEntity(IEntityMapper $mapper) : mixed
Parameters
$mapper : IEntityMapper
Tags
inheritdoc
Return values
mixed

set_id()

Set ID of the Entity

public set_id(int|string|null $id) : void
Parameters
$id : int|string|null

ID of the Entity

Return values
void

Search results