public function schemaValidateSource($source)
    {
        if (empty($source)) {
            throw new \DOMException('Schema is empty.');
        }

        $user_error_handling = $this->enableErrorHandling();

        $success = parent::schemaValidateSource($source);

        $this->handleErrors(
            'Validating the document failed. Details are:' . PHP_EOL . PHP_EOL,
            PHP_EOL . 'Please fix the mentioned errors or use another schema.',
            $user_error_handling
        );

        return $success;
    }
public function schemaValidateSource($source)
    {
        if (empty($source)) {
            throw new \DOMException('Schema is empty.');
        }

        $user_error_handling = $this->enableErrorHandling();

        $success = parent::schemaValidateSource($source);

        $this->handleErrors(
            'Validating the document failed. Details are:' . PHP_EOL . PHP_EOL,
            PHP_EOL . 'Please fix the mentioned errors or use another schema.',
            $user_error_handling
        );

        return $success;
    }
public function schemaValidateSource ( $ source ) { if ( empty ( $ source ) ) { throw new \ DOMException ( 'Schema is empty.' ) ; } $ user_error_handling = $ this -> enableErrorHandling ( ) ; $ success = parent :: schemaValidateSource ( $ source ) ; $ this -> handleErrors ( 'Validating the document failed. Details are:' . PHP_EOL . PHP_EOL , PHP_EOL . 'Please fix the mentioned errors or use another schema.' , $ user_error_handling ) ; return $ success ; }
Validates the current document according to the given schema file content.

@param string $source content of a schema file

@return bool true on success

@throws \DomException in case of validation errors or empty schema
Validates the current document according to the given schema file content .