FOSElasticaBundle/Transformer/ModelToElasticaTransformerInterface.php
2015-03-12 21:20:00 +11:00

20 lines
480 B
PHP

<?php
namespace FOS\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
**/
public function transform($object, array $fields);
}