/** * Creates an data array the is send by postRequest for a stopword * * @param \Searchperience\Api\Client\Domain\AbstractEntity $stopword * @return array */ protected function buildRequestArray(\Searchperience\Api\Client\Domain\AbstractEntity $stopword) { $valueArray = array(); /** @var \Searchperience\Api\Client\Domain\Stopword\Stopword $stopword */ if (!is_null($stopword->getWord())) { $valueArray['word'] = $stopword->getWord(); } if (!is_null($stopword->getTagName())) { $valueArray['tagName'] = $stopword->getTagName(); } return $valueArray; }
/** * Creates an data array the is send by postRequest for a synonym * * @param \Searchperience\Api\Client\Domain\AbstractEntity $synonym * @return array */ protected function buildRequestArray(\Searchperience\Api\Client\Domain\AbstractEntity $synonym) { $valueArray = array(); /** @var \Searchperience\Api\Client\Domain\Synonym\Synonym $synonym */ if (!is_null($synonym->getSynonyms())) { $valueArray['synonyms'] = $synonym->getSynonyms(); } if (!is_null($synonym->getTagName())) { $valueArray['tagName'] = $synonym->getTagName(); } if (!is_null($synonym->getType())) { $valueArray['type'] = $synonym->getType(); } if (!is_null($synonym->getMappedWords())) { $valueArray['mappedWords'] = $synonym->getMappedWords(); } return $valueArray; }