RomaricDrigon\MetaYaml\MetaYaml::validateSchema PHP Method

validateSchema() public method

can take up to a second
public validateSchema ( )
    public function validateSchema()
    {
        $meta_schema_validator = new SchemaValidator();
        $json_loader = new JsonLoader();
        // we have to check if we use a prefix
        $meta_json = file_get_contents(__DIR__ . '/../../../data/MetaSchema.json');
        $meta_json = str_replace('#', $this->prefix, $meta_json);
        // we validate the schema using the meta schema, defining the structure of our schema
        $meta_schema_validator->validate($json_loader->load($meta_json), $this->schema);
        return true;
    }