Complete provider, finder, transformers and configuration refactoring
This commit is contained in:
parent
7be25f92bb
commit
0db0490be5
17 changed files with 444 additions and 320 deletions
18
Transformer/ModelToElasticaTransformerInterface.php
Normal file
18
Transformer/ModelToElasticaTransformerInterface.php
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
<?php
|
||||
|
||||
namespace FOQ\ElasticaBundle\Transformer;
|
||||
|
||||
/**
|
||||
* Maps Elastica documents with model objects
|
||||
*/
|
||||
interface ModelToElasticaTransformerInterface
|
||||
{
|
||||
/**
|
||||
* Transforms an object into an elastica object having the required keys
|
||||
*
|
||||
* @param object $object the object to convert
|
||||
* @param array $fields the keys we want to have in the returned array
|
||||
* @return Elastica_Document
|
||||
**/
|
||||
function transform($object, array $fields);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue