From 88bea60a03dae8de065f1728506982e843153682 Mon Sep 17 00:00:00 2001 From: Olivier Hill Date: Thu, 23 Aug 2007 12:52:06 +0000 Subject: [PATCH] Documenting new functions found in newer releases git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@241753 c90b9560-bf6c-de11-be94-00142212c4b1 --- reference/geoip/functions/geoip-db-avail.xml | 98 +++++++++++ .../geoip/functions/geoip-db-filename.xml | 99 ++++++++++++ .../geoip/functions/geoip-db-get-all-info.xml | 152 ++++++++++++++++++ 3 files changed, 349 insertions(+) create mode 100644 reference/geoip/functions/geoip-db-avail.xml create mode 100644 reference/geoip/functions/geoip-db-filename.xml create mode 100644 reference/geoip/functions/geoip-db-get-all-info.xml diff --git a/reference/geoip/functions/geoip-db-avail.xml b/reference/geoip/functions/geoip-db-avail.xml new file mode 100644 index 0000000000..1acbce516b --- /dev/null +++ b/reference/geoip/functions/geoip-db-avail.xml @@ -0,0 +1,98 @@ + + + + + geoip_db_avail + Determine if GeoIP Database is available + + + &reftitle.description; + + boolgeoip_db_avail + intdatabase + + + + The geoip_db_avail function returns if the corresponding + GeoIP Database is available and can be opened on disk. + + + + It does not indicate if the file is a proper database, only if it is readable. + + + + + &reftitle.parameters; + + + + database + + + The database type as an integer. You can use the + various constants defined with + this extension (ie: GEOIP_*_EDITION). + + + + + + + + + &reftitle.returnvalues; + + Returns &true; is database exists, &false; if not found, or &null; on error. + + + + + &reftitle.examples; + + + A <function>geoip_db_avail</function> example + + This will output the current database version string. + + + +]]> + + &example.outputs; + + + + + + + + + + diff --git a/reference/geoip/functions/geoip-db-filename.xml b/reference/geoip/functions/geoip-db-filename.xml new file mode 100644 index 0000000000..f51e44b76d --- /dev/null +++ b/reference/geoip/functions/geoip-db-filename.xml @@ -0,0 +1,99 @@ + + + + + geoip_db_filename + Returns the filename of the corresponding GeoIP Database + + + &reftitle.description; + + stringgeoip_db_filename + intdatabase + + + + The geoip_db_filename function returns the filename of + the corresponding GeoIP Database. + + + + It does not indicate if the file exists or not on disk, only where the library + is looking for the database. + + + + + &reftitle.parameters; + + + + database + + + The database type as an integer. You can use the + various constants defined with + this extension (ie: GEOIP_*_EDITION). + + + + + + + + + &reftitle.returnvalues; + + Returns the filename of the corresponding database, or &null; on error. + + + + + &reftitle.examples; + + + A <function>geoip_db_avail</function> example + + This will output the current database version string. + + + +]]> + + &example.outputs; + + + + + + + + + + diff --git a/reference/geoip/functions/geoip-db-get-all-info.xml b/reference/geoip/functions/geoip-db-get-all-info.xml new file mode 100644 index 0000000000..a27e69ff7f --- /dev/null +++ b/reference/geoip/functions/geoip-db-get-all-info.xml @@ -0,0 +1,152 @@ + + + + + geoip_db_get_all_info + Returns detailed informations about all GeoIP database types + + + &reftitle.description; + + arraygeoip_db_get_all_info + + + + The geoip_db_get_all_info function will return + detailed informations as a multi-dimensional array about all the + GeoIP database types. + + + This function is available even if no databases are installed. It + will simply list them as non-available. + + + The names of the different keys of the returning associative array are as follows: + + + + + + "available" -- Boolean, indicate if DB is available (see + geoip_db_avail) + + + + + "description" -- The database description + + + + + "filename" -- The database filename on disk (see + geoip_db_filename) + + + + + + + + &reftitle.returnvalues; + + Returns the associative array. + + + + + &reftitle.examples; + + + A <function>geoip_db_get_all_info</function> example + + This will print the array containing all the informations. + + + +]]> + + &example.outputs; + + + array(3) { + ["available"]=> + bool(true) + ["description"]=> + string(21) "GeoIP Country Edition" + ["filename"]=> + string(32) "/usr/share/GeoIP/GeoIP.dat" + } + +[ ... ] + + [11]=> + array(3) { + ["available"]=> + bool(false) + ["description"]=> + string(25) "GeoIP Domain Name Edition" + ["filename"]=> + string(38) "/usr/share/GeoIP/GeoIPDomain.dat" + } +} +]]> + + + + + + + A <function>geoip_db_get_all_info</function> example + + You can use the various constants as keys to get only parts of the information. + + + +]]> + + &example.outputs; + + + + + + + + + +