예제 #1
0
 /**
  * @param string $tag
  * @param string $string
  *
  * @return string
  *
  * @throws SitemapException
  */
 protected function setStringValue($tag, $string)
 {
     if (false === ValidatorTrait::validateString($string)) {
         throw new SitemapException(\sprintf('Value for %s is not valid', $tag));
     }
     return "<{$tag}>{$string}</{$tag}>";
 }