public function getSearchComponent($componentName)
    {
        if (!array_key_exists($componentName, self::$searchComponents)) {
            throw new \InvalidArgumentException(
                'No search component registered named ' . $componentName,
                1343398440
            );
        }

        $searchComponent = GeneralUtility::makeInstance(self::$searchComponents[$componentName]);

        if (!($searchComponent instanceof SearchComponent)) {
            throw new \RuntimeException(
                'Class ' . self::$searchComponents[$componentName] . ' must implement interface ' . SearchComponent::class,
                1343398621
            );
        }

        return $searchComponent;
    }
public function getSearchComponent($componentName)
    {
        if (!array_key_exists($componentName, self::$searchComponents)) {
            throw new \InvalidArgumentException(
                'No search component registered named ' . $componentName,
                1343398440
            );
        }

        $searchComponent = GeneralUtility::makeInstance(self::$searchComponents[$componentName]);

        if (!($searchComponent instanceof SearchComponent)) {
            throw new \RuntimeException(
                'Class ' . self::$searchComponents[$componentName] . ' must implement interface ' . SearchComponent::class,
                1343398621
            );
        }

        return $searchComponent;
    }
public function getSearchComponent ( $ componentName ) { if ( ! array_key_exists ( $ componentName , self :: $ searchComponents ) ) { throw new \ InvalidArgumentException ( 'No search component registered named ' . $ componentName , 1343398440 ) ; } $ searchComponent = GeneralUtility :: makeInstance ( self :: $ searchComponents [ $ componentName ] ) ; if ( ! ( $ searchComponent instanceof SearchComponent ) ) { throw new \ RuntimeException ( 'Class ' . self :: $ searchComponents [ $ componentName ] . ' must implement interface ' . SearchComponent :: class , 1343398621 ) ; } return $ searchComponent ; }
Instanciates a registered search component

@param string $componentName Search component name
@return SearchComponent Instance of the requested search component
@throws \InvalidArgumentException if $componentName is not a registered search component
@throws \RuntimeException if the class registered for $componentName is not an implementation of ApacheSolrForTypo3\Solr\Search\SearchComponent
Instanciates a registered search component