class EntityIndex extends AbstractIndex implements ApplicationAwareInterface (View source)

Traits

Trait ApplicationAwareTrait A trait used with ApplicationAwareInterface

Properties

protected IndexingDriverInterface $indexDriver from  AbstractIndex
protected Application $app from  ApplicationAwareTrait
protected Entity $entity
protected Connection $connection

Methods

__construct(Connection $connection, Entity $entity)

AbstractIndex constructor.

bool
index(mixed $object)

Add an object to the index

bool
forget(mixed $object)

Remove an object from the index

setApplication(Application $app)

Setter method for the application

void
clear()

Clear out all indexed items

Details

__construct(Connection $connection, Entity $entity)

AbstractIndex constructor.

Parameters

Connection $connection
Entity $entity

bool index(mixed $object)

Add an object to the index

Parameters

mixed $object

Object to index

Return Value

bool

Success or fail

bool forget(mixed $object)

Remove an object from the index

Parameters

mixed $object

Object to forget

Return Value

bool

Success or fail

protected IndexingDriverInterface getIndexer()

No description

setApplication(Application $app)

Setter method for the application

Parameters

Application $app

void clear()

Clear out all indexed items

Return Value

void