src/ReadlineTemplate/ReadlineTemplate.php
/**
     * Tests if the loaded template complies with the rules defined in a .xsd-schema.
     * @param string $schema Path to an alternative schema
     * @return boolean
     */
Tests if the loaded template complies with the rules defined in a .xsd-schema.
@param string $schema Path to an alternative schema
@return boolean
Tests if the loaded template complies with the rules defined in a . xsd - schema . @param string $schema Path to an alternative schema @return boolean
public function isValidTemplate($schema = null) {
        if ($schema == null) {
            $schema = __DIR__ . DIRECTORY_SEPARATOR . "Template.xsd";
        }
        $dom = new \DOMDocument();
        $dom->loadXML($this->template);
        libxml_use_internal_errors(false);
        return $dom->schemaValidate($schema);
    }
public function isValidTemplate ( $ schema = null ) { if ( $ schema == null ) { $ schema = __DIR__ . DIRECTORY_SEPARATOR . " Template.xsd " ; } $ dom = new \ DOMDocument ( ) ; $ dom -> loadXML ( $ this -> template ) ; libxml_use_internal_errors ( false ) ; return $ dom -> schemaValidate ( $ schema ) ; }
Tests if the loaded template complies with the rules defined in a .xsd-schema.
Tests if the loaded template complies with the rules defined in a . xsd - schema .