PHP Class Newscoop\Search\DefaultIndexClient

Inheritance: implements Newscoop\Search\IndexClientInterface
Show file Open project: sourcefabric/newscoop

Protected Properties

Property Type Description
$add array Contains data to be added
$container Symfony\Component\DependencyInjection\Container Symfony container
$delete array Contains data to be deleted
$item Newscoop\Search\DocumentInterface Indexable item
$service Newscoop\Search\ServiceInterface Newscoop service interface
$update array Contains data to be updated

Public Methods

Method Description
__construct ( Symfony\Component\DependencyInjection\Container $container )
add ( array $document ) : boolean Adds data to inderxer
delete ( string $document ) : boolean Delete item from index
deleteAll ( ) : boolean Delete all indexed data
flush ( ) : boolean Flush all commands
isEnabled ( $clientName )
isTypeIndexable ( $serviceName, $subType )
setItem ( Newscoop\Search\DocumentInterface $item ) Set item. This method gives the possibility for the indexing client to access extra data in regards to the default indexable content;
setService ( Newscoop\Search\ServiceInterface $service ) Set service for
update ( array $document ) : boolean Updates element in indexer (if supported)

Method Details

__construct() public method

public __construct ( Symfony\Component\DependencyInjection\Container $container )
$container Symfony\Component\DependencyInjection\Container

add() public method

Adds data to inderxer
public add ( array $document ) : boolean
$document array Indexable array, must contain key 'id'
return boolean

delete() public method

Delete item from index
public delete ( string $document ) : boolean
$document string Id of indexable data
return boolean

deleteAll() public method

Delete all indexed data
public deleteAll ( ) : boolean
return boolean

flush() public method

Flush all commands
public flush ( ) : boolean
return boolean

isEnabled() public method

public isEnabled ( $clientName )

isTypeIndexable() public method

public isTypeIndexable ( $serviceName, $subType )

setItem() public method

Set item. This method gives the possibility for the indexing client to access extra data in regards to the default indexable content;
public setItem ( Newscoop\Search\DocumentInterface $item )
$item Newscoop\Search\DocumentInterface

setService() public method

Set service for
public setService ( Newscoop\Search\ServiceInterface $service )
$service Newscoop\Search\ServiceInterface

update() public method

Updates element in indexer (if supported)
public update ( array $document ) : boolean
$document array Re-indexable data, must contain key 'id'
return boolean

Property Details

$add protected property

Contains data to be added
protected array $add
return array

$container protected property

Symfony container
protected Container,Symfony\Component\DependencyInjection $container
return Symfony\Component\DependencyInjection\Container

$delete protected property

Contains data to be deleted
protected array $delete
return array

$item protected property

Indexable item
protected DocumentInterface,Newscoop\Search $item
return Newscoop\Search\DocumentInterface

$service protected property

Newscoop service interface
protected ServiceInterface,Newscoop\Search $service
return Newscoop\Search\ServiceInterface

$update protected property

Contains data to be updated
protected array $update
return array