| 1 | <?php |
||
| 16 | abstract class AbstractElasticaToModelTransformer implements ElasticaToModelTransformerInterface |
||
| 17 | { |
||
| 18 | /** |
||
| 19 | * PropertyAccessor instance. |
||
| 20 | * |
||
| 21 | * @var PropertyAccessorInterface |
||
| 22 | */ |
||
| 23 | protected $propertyAccessor; |
||
| 24 | |||
| 25 | /** |
||
| 26 | * Set the PropertyAccessor instance. |
||
| 27 | * |
||
| 28 | * @param PropertyAccessorInterface $propertyAccessor |
||
| 29 | */ |
||
| 30 | 10 | public function setPropertyAccessor(PropertyAccessorInterface $propertyAccessor) |
|
| 34 | |||
| 35 | /** |
||
| 36 | * Returns a sorting closure to be used with usort() to put retrieved objects |
||
| 37 | * back in the order that they were returned by ElasticSearch. |
||
| 38 | * |
||
| 39 | * @param array $idPos |
||
| 40 | * @param string $identifierPath |
||
| 41 | * @return callable |
||
| 42 | */ |
||
| 43 | protected function getSortingClosure(array $idPos, $identifierPath) |
||
| 51 | } |
||
| 52 |