src/LdapTools/Schema/Parser/SchemaYamlParser.php
protected function getSchemaFileName($folder, $schema)
    {
        $file = null;

        foreach (['yml', 'yaml'] as $ext) {
            $fileCheck = $folder.'/'.$schema.'.'.$ext;
            if (is_readable($fileCheck)) {
                $file = $fileCheck;
                break;
            }
        }

        if (is_null($file)) {
            throw new SchemaParserException(sprintf('Cannot find schema for "%s" in "%s"', $schema, $folder));
        }

        return $file;
    }
protected function getSchemaFileName($folder, $schema)
    {
        $file = null;

        foreach (['yml', 'yaml'] as $ext) {
            $fileCheck = $folder.'/'.$schema.'.'.$ext;
            if (is_readable($fileCheck)) {
                $file = $fileCheck;
                break;
            }
        }

        if (is_null($file)) {
            throw new SchemaParserException(sprintf('Cannot find schema for "%s" in "%s"', $schema, $folder));
        }

        return $file;
    }
protected function getSchemaFileName ( $ folder , $ schema ) { $ file = null ; foreach ( [ 'yml' , 'yaml' ] as $ ext ) { $ fileCheck = $ folder . '/' . $ schema . '.' . $ ext ; if ( is_readable ( $ fileCheck ) ) { $ file = $ fileCheck ; break ; } } if ( is_null ( $ file ) ) { throw new SchemaParserException ( sprintf ( 'Cannot find schema for "%s" in "%s"' , $ schema , $ folder ) ) ; } return $ file ; }
Check for a YML file of the specified schema name and return the full path.

@param string $folder
@param string $schema
@return string
@throws SchemaParserException
Check for a YML file of the specified schema name and return the full path .