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 ElasticaToModelTransformerInterface
|
|
|
|
{
|
|
|
|
/**
|
|
|
|
* Transforms an array of elastica objects into an array of
|
|
|
|
* model objects fetched from the doctrine repository
|
|
|
|
*
|
2013-03-02 12:23:44 +01:00
|
|
|
* @param array $elasticaObjects array of elastica objects
|
2011-04-27 09:59:04 +02:00
|
|
|
* @return array of model objects
|
|
|
|
**/
|
|
|
|
function transform(array $elasticaObjects);
|
2012-01-03 23:16:56 +01:00
|
|
|
|
2012-02-23 23:50:46 +01:00
|
|
|
function hybridTransform(array $elasticaObjects);
|
|
|
|
|
2012-01-03 23:16:56 +01:00
|
|
|
/**
|
|
|
|
* Returns the object class used by the transformer.
|
|
|
|
*
|
|
|
|
* @return string
|
|
|
|
*/
|
|
|
|
function getObjectClass();
|
2012-09-25 00:15:05 +02:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Returns the identifier field from the options
|
|
|
|
*
|
|
|
|
* @return string the identifier field
|
|
|
|
*/
|
|
|
|
function getIdentifierField();
|
2011-04-27 09:59:04 +02:00
|
|
|
}
|