Piwik\Plugins\UserCountry\LocationProvider::getCurrentProvider PHP 메소드

getCurrentProvider() 공개 정적인 메소드

This function should not be called by the Tracker.
public static getCurrentProvider ( ) : LocationProvider | null
리턴 LocationProvider | null
    public static function getCurrentProvider()
    {
        return self::getProviderById(self::getCurrentProviderId());
    }

Usage Example

예제 #1
0
 /**
  * Returns true if a GeoIP provider is installed & working, false if otherwise.
  *
  * @return bool
  */
 public function isGeoIPWorking()
 {
     $provider = LocationProvider::getCurrentProvider();
     return $provider instanceof GeoIp && $provider->isAvailable() === true && $provider->isWorking() === true;
 }