public function listTagsForResource($resourceName, $resourceType)
{
$result = null;
$options = ['ResourceName' => $this->rds->getResourceName($resourceName, $resourceType)];
$action = ucfirst(__FUNCTION__);
$response = $this->client->call($action, $options);
if ($response->getError() === false) {
$sxml = simplexml_load_string($response->getRawContent());
if (!$this->exist($sxml->{$action . 'Result'})) {
throw new RdsException(sprintf(self::UNEXPECTED, $action));
}
$ptr = $sxml->{$action . 'Result'};
$result = new TagsList();
$result->setRds($this->rds);
if (isset($ptr->TagList->Tag)) {
foreach ($ptr->TagList->Tag as $v) {
$item = $this->_loadTagData($v);
$result->append($item);
unset($item);
}
}
}
return $result;
}