src/Validator.php
static function setDefaultLanguage(string $language) {
        if(!\class_exists($language, true)) {
            throw new \InvalidArgumentException('Unknown language class');
        } elseif(!\in_array(\CharlotteDunois\Validation\LanguageInterface::class, \class_implements($language), true)) {
            throw new \InvalidArgumentException('Invalid language class (not implementing language interface)');
        }
        
        static::$defaultLanguage = $language;
    }
static function setDefaultLanguage(string $language) {
        if(!\class_exists($language, true)) {
            throw new \InvalidArgumentException('Unknown language class');
        } elseif(!\in_array(\CharlotteDunois\Validation\LanguageInterface::class, \class_implements($language), true)) {
            throw new \InvalidArgumentException('Invalid language class (not implementing language interface)');
        }
        
        static::$defaultLanguage = $language;
    }
static function setDefaultLanguage ( string $ language ) { if ( ! \ class_exists ( $ language , true ) ) { throw new \ InvalidArgumentException ( 'Unknown language class' ) ; } elseif ( ! \ in_array ( \ CharlotteDunois \ Validation \ LanguageInterface :: class , \ class_implements ( $ language ) , true ) ) { throw new \ InvalidArgumentException ( 'Invalid language class (not implementing language interface)' ) ; } static :: $ defaultLanguage = $ language ; }
Sets the default language for the Validator.
@param string  $language
@return void
@throws \InvalidArgumentException
Sets the default language for the Validator .