protected function getIndexTypeForObject($object, Client $client = null)
    {
        if ($client === null) {
            $client = $this->client;
        }
        $className = TypeHandling::getTypeForValue($object);
        $indexAnnotation = $this->indexInformer->getClassAnnotation($className);
        if ($indexAnnotation === null) {
            return null;
        }
        $index = $client->findIndex($indexAnnotation->indexName);

        return new GenericType($index, $indexAnnotation->typeName);
    }
protected function getIndexTypeForObject($object, Client $client = null)
    {
        if ($client === null) {
            $client = $this->client;
        }
        $className = TypeHandling::getTypeForValue($object);
        $indexAnnotation = $this->indexInformer->getClassAnnotation($className);
        if ($indexAnnotation === null) {
            return null;
        }
        $index = $client->findIndex($indexAnnotation->indexName);

        return new GenericType($index, $indexAnnotation->typeName);
    }
protected function getIndexTypeForObject ( $ object , Client $ client = null ) { if ( $ client === null ) { $ client = $ this -> client ; } $ className = TypeHandling :: getTypeForValue ( $ object ) ; $ indexAnnotation = $ this -> indexInformer -> getClassAnnotation ( $ className ) ; if ( $ indexAnnotation === null ) { return null ; } $ index = $ client -> findIndex ( $ indexAnnotation -> indexName ) ; return new GenericType ( $ index , $ indexAnnotation -> typeName ) ; }
Returns the ElasticSearch type for a specific object, by its annotation

@param object $object
@param Client $client
@return GenericType
Returns the ElasticSearch type for a specific object by its annotation