public static function registerExtension(string $fileExtension, $class)
    {
        if (
            in_array(
                'Aidantwoods\BetterOptions\FileLoader',
                class_implements($class),
                true
            )
        ) {
            self::$classMap[strtolower($fileExtension)] = $class;
        }
        else
        {
            throw new Exception(
                "Classes must implement the "
                ."Aidantwoods\BetterOptions\FileLoader interface in order to "
                ."be registered in the FileLoaderFactory. $class does not "
                ."implement this interface."
            );
        }
    }
public static function registerExtension(string $fileExtension, $class)
    {
        if (
            in_array(
                'Aidantwoods\BetterOptions\FileLoader',
                class_implements($class),
                true
            )
        ) {
            self::$classMap[strtolower($fileExtension)] = $class;
        }
        else
        {
            throw new Exception(
                "Classes must implement the "
                ."Aidantwoods\BetterOptions\FileLoader interface in order to "
                ."be registered in the FileLoaderFactory. $class does not "
                ."implement this interface."
            );
        }
    }
public static function registerExtension ( string $ fileExtension , $ class ) { if ( in_array ( 'Aidantwoods\BetterOptions\FileLoader' , class_implements ( $ class ) , true ) ) { self :: $ classMap [ strtolower ( $ fileExtension ) ] = $ class ; } else { throw new Exception ( "Classes must implement the " . "Aidantwoods\BetterOptions\FileLoader interface in order to " . "be registered in the FileLoaderFactory. $class does not " . "implement this interface." ) ; } }
Register a custom class to handle a particular file extension

@param string $fileExtension
@param string $class
The fully qualified class name. The given class MUST implement the
Aidantwoods\BetterOptions\FileLoader interface

@throws Exception if the class fails to implement the required interface
Register a custom class to handle a particular file extension