public function validateFile($fileName, $schemaFile = null, $failOnErrors = false)
    {

        // if we did not get a schema file we have to check if we know which one to use
        if (is_null($schemaFile)) {
            $this->findSchemaFile($fileName);
            $schemaFile = $this->schemaFile;
        }

        // validate the passed configuration file
        ConfigurationUtils::singleton()->validateFile($fileName, $schemaFile, $failOnErrors);
    }
public function validateFile($fileName, $schemaFile = null, $failOnErrors = false)
    {

        // if we did not get a schema file we have to check if we know which one to use
        if (is_null($schemaFile)) {
            $this->findSchemaFile($fileName);
            $schemaFile = $this->schemaFile;
        }

        // validate the passed configuration file
        ConfigurationUtils::singleton()->validateFile($fileName, $schemaFile, $failOnErrors);
    }
public function validateFile ( $ fileName , $ schemaFile = null , $ failOnErrors = false ) { // if we did not get a schema file we have to check if we know which one to use if ( is_null ( $ schemaFile ) ) { $ this -> findSchemaFile ( $ fileName ) ; $ schemaFile = $ this -> schemaFile ; } // validate the passed configuration file ConfigurationUtils :: singleton ( ) -> validateFile ( $ fileName , $ schemaFile , $ failOnErrors ) ; }
Will validate a given file against a schema.
This method supports several validation mechanisms for different file types.
Will return true if validation passes, false otherwise.
A specific schema file to use might be passed as well, if none is given the tester tries to choose the right one

@param string      $fileName     Name of the file to validate
@param string|null $schemaFile   The specific schema file to validate against (optional)
@param boolean     $failOnErrors If the validation should fail on error (optional)

@return void

@throws \Exception If aren't able to validate this file type
Will validate a given file against a schema . This method supports several validation mechanisms for different file types . Will return true if validation passes false otherwise . A specific schema file to use might be passed as well if none is given the tester tries to choose the right one