/** * 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; }