Captioning\File::getFormat PHP Method

getFormat() public static method

public static getFormat ( captioning\FileInterface $_file ) : mixed
$_file captioning\FileInterface
return mixed
    public static function getFormat(FileInterface $_file)
    {
        if (!is_subclass_of($_file, __NAMESPACE__ . '\\File')) {
            throw new \InvalidArgumentException('Expected subclass of File');
        }
        $fullNamespace = explode('\\', get_class($_file));
        $tmp = explode('File', end($fullNamespace));
        return $tmp[0];
    }