440c36f537
Conflicts: Command/PopulateCommand.php Command/SearchCommand.php DependencyInjection/Configuration.php Doctrine/AbstractElasticaToModelTransformer.php Doctrine/AbstractListener.php Doctrine/MongoDB/ElasticaToModelTransformer.php Doctrine/ORM/ElasticaToModelTransformer.php Doctrine/RepositoryManager.php Finder/TransformedFinder.php Paginator/PaginatorAdapterInterface.php Paginator/RawPaginatorAdapter.php Persister/ObjectPersister.php Propel/ElasticaToModelTransformer.php Subscriber/PaginateElasticaQuerySubscriber.php Tests/DataCollector/ElasticaDataCollectorTest.php Tests/Doctrine/AbstractProviderTest.php Tests/Doctrine/RepositoryManagerTest.php Tests/Manager/RepositoryManagerTest.php Tests/RepositoryTest.php Transformer/ElasticaToModelTransformerCollection.php composer.json
35 lines
793 B
PHP
35 lines
793 B
PHP
<?php
|
|
|
|
namespace FOS\ElasticaBundle\Transformer;
|
|
|
|
/**
|
|
* 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
|
|
*
|
|
* @param array $elasticaObjects array of elastica objects
|
|
* @return array of model objects
|
|
**/
|
|
function transform(array $elasticaObjects);
|
|
|
|
function hybridTransform(array $elasticaObjects);
|
|
|
|
/**
|
|
* Returns the object class used by the transformer.
|
|
*
|
|
* @return string
|
|
*/
|
|
function getObjectClass();
|
|
|
|
/**
|
|
* Returns the identifier field from the options
|
|
*
|
|
* @return string the identifier field
|
|
*/
|
|
function getIdentifierField();
|
|
}
|