/**
  * Wrapper around TermSearchInteractor::searchForEntities
  *
  * @see TermSearchInteractor::searchForEntities
  *
  * @param string $text
  * @param string $languageCode
  * @param string $entityType
  * @param int $limit
  * @param bool $prefixSearch
  * @param bool $strictLanguage
  *
  * @return TermSearchResult[]
  */
 private function searchEntities($text, $languageCode, $entityType, $limit, $prefixSearch, $strictLanguage)
 {
     $this->termIndexSearchInteractor->setLimit($limit);
     $this->termIndexSearchInteractor->setIsPrefixSearch($prefixSearch);
     $this->termIndexSearchInteractor->setIsCaseSensitive(false);
     $this->termIndexSearchInteractor->setUseLanguageFallback(!$strictLanguage);
     return $this->termIndexSearchInteractor->searchForEntities($text, $languageCode, $entityType, array(TermIndexEntry::TYPE_LABEL, TermIndexEntry::TYPE_ALIAS));
 }
 /**
  * @param bool|null $caseSensitive
  * @param bool|null $prefixSearch
  * @param int|null $limit
  * @param bool|null $useFallback
  *
  * @return TermIndexSearchInteractor
  */
 private function newTermSearchInteractor($caseSensitive = null, $prefixSearch = null, $limit = null, $useFallback = null)
 {
     $interactor = new TermIndexSearchInteractor($this->getMockTermIndex(), $this->getMockLanguageFallbackChainFactory(), $this->getMockBufferingTermLookup(), 'pt');
     if ($caseSensitive !== null) {
         $interactor->setIsCaseSensitive($caseSensitive);
     }
     if ($prefixSearch !== null) {
         $interactor->setIsPrefixSearch($prefixSearch);
     }
     if ($limit !== null) {
         $interactor->setLimit($limit);
     }
     if ($useFallback !== null) {
         $interactor->setUseLanguageFallback($useFallback);
     }
     return $interactor;
 }