lib/ResultExtractor/NativeResultExtractor.php
public function extractHit($hit)
    {
        if ($hit->document_type_id === 'content') {
            return $this->extractContentInfoFromHit($hit);
        }

        if ($hit->document_type_id === 'location') {
            return $this->extractLocationFromHit($hit);
        }

        throw new RuntimeException(
            "Could not extract: document of type '{$hit->document_type_id}' is not handled."
        );
    }
public function extractHit($hit)
    {
        if ($hit->document_type_id === 'content') {
            return $this->extractContentInfoFromHit($hit);
        }

        if ($hit->document_type_id === 'location') {
            return $this->extractLocationFromHit($hit);
        }

        throw new RuntimeException(
            "Could not extract: document of type '{$hit->document_type_id}' is not handled."
        );
    }
public function extractHit ( $ hit ) { if ( $ hit -> document_type_id === 'content' ) { return $ this -> extractContentInfoFromHit ( $ hit ) ; } if ( $ hit -> document_type_id === 'location' ) { return $ this -> extractLocationFromHit ( $ hit ) ; } throw new RuntimeException ( "Could not extract: document of type '{$hit->document_type_id}' is not handled." ) ; }
Extracts value object from $hit returned by Solr backend.

@throws \RuntimeException If search $hit could not be handled

@param mixed $hit

@return \eZ\Publish\API\Repository\Values\ValueObject
Extracts value object from $hit returned by Solr backend .