PATH:
var
/
www
/
clients
/
client1
/
web1
/
web
/
wp-content
/
sitepress-multilingual-cms
/
classes
/
xml-config
<?php /** * @author OnTheGo Systems */ class WPML_XML_Config_Validate { /** * @var \LibXMLError[] */ private $errors = []; private $path_to_xsd; function __construct( $path_to_xsd = null ) { $this->path_to_xsd = $path_to_xsd ? realpath( $path_to_xsd ) : null; } /** * @return \LibXMLError[] */ public function get_errors() { return $this->errors; } /** * @param string $file_full_path * * @return bool */ function from_file( $file_full_path ) { $this->errors = array(); $xml = file_get_contents( $file_full_path ); return $this->from_string( $xml ); } /** * @param string $xml * * @return bool */ function from_string( $xml ) { if ( '' === preg_replace( '/(\W)+/', '', $xml ) ) { return false; } $this->errors = array(); libxml_use_internal_errors( true ); $xml_object = $this->get_xml( $xml ); if ( $this->path_to_xsd && ! $xml_object->schemaValidate( $this->path_to_xsd ) ) { $this->errors = libxml_get_errors(); } libxml_clear_errors(); return count($this->errors) === 0; } /** * @param string $content The string representation of the XML file * * @return DOMDocument */ private function get_xml( $content ) { $xml = new DOMDocument(); $xml->loadXML( $content ); return $xml; } }
[-] class-wpml-config-built-with-page-builders.php
[edit]
[-] class-wpml-config-shortcode-list.php
[edit]
[-] class-wpml-config-update-log.php
[edit]
[+]
read
[+]
transform
[-] class-wpml-custom-xml.php
[edit]
[-] class-wpml-xml-config-validate.php
[edit]
[-] class-wpml-config.php
[edit]
[+]
log
[-] class-wpml-config-display-as-translated.php
[edit]
[+]
..