Ejemplo n.º 1
0
 /**
  * @param FeedTypeInterface $type
  *
  * @return null|string
  */
 protected function getNamespaceAttributes(FeedTypeInterface $type)
 {
     $namespaces = $type->getNamespaces();
     if (empty($namespaces)) {
         return null;
     }
     $str = '';
     foreach ($namespaces as $name => $schemaLocation) {
         $str .= sprintf('xmlns="%s" xmlns:xsi="%s" xsi:schemaLocation="%s %s" ', $name, 'http://www.w3.org/2001/XMLSchema-instance', $name, $schemaLocation);
     }
     return trim($str);
 }