Doctrine integration refactoring, adds realtime index updates
This commit is contained in:
parent
09fe17d36b
commit
6fee4131f4
15 changed files with 508 additions and 58 deletions
41
Persister/ObjectPersisterInterface.php
Normal file
41
Persister/ObjectPersisterInterface.php
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
<?php
|
||||
|
||||
namespace FOQ\ElasticaBundle\Persister;
|
||||
|
||||
/**
|
||||
* Inserts, replaces and deletes single documents in an elastica type
|
||||
* Accepts domain model objects and converts them to elastica documents
|
||||
*
|
||||
* @author Thibault Duplessis <thibault.duplessis@gmail.com>
|
||||
*/
|
||||
interface ObjectPersisterInterface
|
||||
{
|
||||
/**
|
||||
* Insert one object into the type
|
||||
* The object will be transformed to an elastica document
|
||||
*
|
||||
* @param object $object
|
||||
*/
|
||||
function insertOne($object);
|
||||
|
||||
/**
|
||||
* Replaces one object in the type
|
||||
*
|
||||
* @param object $object
|
||||
**/
|
||||
function replaceOne($object);
|
||||
|
||||
/**
|
||||
* Deletes one object in the type
|
||||
*
|
||||
* @param object $object
|
||||
**/
|
||||
function deleteOne($object);
|
||||
|
||||
/**
|
||||
* Inserts an array of objects in the type
|
||||
*
|
||||
* @param array of domain model objects
|
||||
**/
|
||||
function insertMany(array $objects);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue