public static function getProviderById($providerId)
    {
        foreach (self::getAllProviders() as $provider) {
            if ($provider->getId() == $providerId && $provider->isAvailable()) {
                return $provider;
            }
        }
        
        return null;
    }
public static function getProviderById($providerId)
    {
        foreach (self::getAllProviders() as $provider) {
            if ($provider->getId() == $providerId && $provider->isAvailable()) {
                return $provider;
            }
        }
        
        return null;
    }
public static function getProviderById ( $ providerId ) { foreach ( self :: getAllProviders ( ) as $ provider ) { if ( $ provider -> getId ( ) == $ providerId && $ provider -> isAvailable ( ) ) { return $ provider ; } } return null ; }
Returns a provider instance by ID or false if the ID is invalid or unavailable.

@param string $providerId
@return \Piwik\Plugins\UserCountry\LocationProvider|null
Returns a provider instance by ID or false if the ID is invalid or unavailable .