Piwik\Plugins\UserCountry\LocationProvider\GeoIp\Php::getInfo PHP Метод

getInfo() публичный Метод

array( 'id' => 'geoip_php', 'title' => '...', 'description' => '...' );
public getInfo ( ) : array
Результат array
    public function getInfo()
    {
        $desc = Piwik::translate('UserCountry_GeoIpLocationProviderDesc_Php1') . '<br/><br/>' . Piwik::translate('UserCountry_GeoIpLocationProviderDesc_Php2', array('<strong>', '</strong>', '<strong>', '</strong>'));
        $installDocs = '<a rel="noreferrer"  target="_blank" href="http://piwik.org/faq/how-to/#faq_163">' . Piwik::translate('UserCountry_HowToInstallGeoIPDatabases') . '</a>';
        $availableDatabaseTypes = array();
        if (self::getPathToGeoIpDatabase(array('GeoIPCity.dat', 'GeoLiteCity.dat')) !== false) {
            $availableDatabaseTypes[] = Piwik::translate('UserCountry_City');
        }
        if (self::getPathToGeoIpDatabase(array('GeoIPRegion.dat')) !== false) {
            $availableDatabaseTypes[] = Piwik::translate('UserCountry_Region');
        }
        if (self::getPathToGeoIpDatabase(array('GeoIPCountry.dat')) !== false) {
            $availableDatabaseTypes[] = Piwik::translate('UserCountry_Country');
        }
        if (self::getPathToGeoIpDatabase(array('GeoIPISP.dat')) !== false) {
            $availableDatabaseTypes[] = 'ISP';
        }
        if (self::getPathToGeoIpDatabase(array('GeoIPOrg.dat')) !== false) {
            $availableDatabaseTypes[] = Piwik::translate('UserCountry_Organization');
        }
        $extraMessage = '<strong>' . Piwik::translate('General_Note') . '</strong>:&nbsp;' . Piwik::translate('UserCountry_GeoIPImplHasAccessTo') . ':&nbsp;<strong>' . implode(', ', $availableDatabaseTypes) . '</strong>.';
        return array('id' => self::ID, 'title' => self::TITLE, 'description' => $desc, 'install_docs' => $installDocs, 'extra_message' => $extraMessage, 'order' => 2);
    }