PHP Class Piwik\Plugins\UserCountry\API

Inheritance: extends Piwik\Plugin\API
Exibir arquivo Open project: piwik/piwik

Public Methods

Method Description
getCity ( integer | string $idSite, string $period, string $date, string | boolean $segment = false ) : DataTable Returns visit information for every city with at least one visit.
getContinent ( $idSite, $period, $date, $segment = false )
getCountry ( $idSite, $period, $date, $segment = false )
getLocationFromIP ( string $ip, boolean | string $provider = false ) : array | false Uses a location provider to find/guess the location of an IP address.
getNumberOfDistinctCountries ( $idSite, $period, $date, $segment = false )
getRegion ( integer | string $idSite, string $period, string $date, string | boolean $segment = false ) : DataTable Returns visit information for every region with at least one visit.
setLocationProvider ( string $providerId ) Set the location provider

Protected Methods

Method Description
getDataTable ( $name, $idSite, $period, $date, $segment )

Method Details

getCity() public method

Returns visit information for every city with at least one visit.
public getCity ( integer | string $idSite, string $period, string $date, string | boolean $segment = false ) : DataTable
$idSite integer | string
$period string
$date string
$segment string | boolean
return Piwik\DataTable

getContinent() public method

public getContinent ( $idSite, $period, $date, $segment = false )

getCountry() public method

public getCountry ( $idSite, $period, $date, $segment = false )

getDataTable() protected method

protected getDataTable ( $name, $idSite, $period, $date, $segment )

getLocationFromIP() public method

See LocationProvider::getLocation to see the details of the result of this function.
public getLocationFromIP ( string $ip, boolean | string $provider = false ) : array | false
$ip string The IP address.
$provider boolean | string The ID of the provider to use or false to use the currently configured one.
return array | false

getNumberOfDistinctCountries() public method

public getNumberOfDistinctCountries ( $idSite, $period, $date, $segment = false )

getRegion() public method

Returns visit information for every region with at least one visit.
public getRegion ( integer | string $idSite, string $period, string $date, string | boolean $segment = false ) : DataTable
$idSite integer | string
$period string
$date string
$segment string | boolean
return Piwik\DataTable

setLocationProvider() public method

Set the location provider
public setLocationProvider ( string $providerId )
$providerId string The ID of the provider to use eg 'default', 'geoip_php', ...