public function transformToElasticaDocument($object)
    {
        $document = $this->transformer->transform($object, []);

        $data = call_user_func($this->serializer, $object);
        $document->setData($data);

        return $document;
    }
public function transformToElasticaDocument($object)
    {
        $document = $this->transformer->transform($object, []);

        $data = call_user_func($this->serializer, $object);
        $document->setData($data);

        return $document;
    }
public function transformToElasticaDocument ( $ object ) { $ document = $ this -> transformer -> transform ( $ object , [ ] ) ; $ data = call_user_func ( $ this -> serializer , $ object ) ; $ document -> setData ( $ data ) ; return $ document ; }
Transforms an object to an elastica document
with just the identifier set.

@param object $object

@return Document the elastica document
Transforms an object to an elastica document with just the identifier set .