2011-04-27 09:59:04 +02:00
|
|
|
<?php
|
|
|
|
|
2013-03-27 18:44:06 +01:00
|
|
|
namespace FOS\ElasticaBundle\Transformer;
|
2011-04-27 09:59:04 +02:00
|
|
|
|
|
|
|
/**
|
|
|
|
* 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
|
2013-04-22 13:20:10 +02:00
|
|
|
* @return \Elastica\Document
|
2011-04-27 09:59:04 +02:00
|
|
|
**/
|
|
|
|
function transform($object, array $fields);
|
|
|
|
}
|