From 18686e11ac24ee5b41baaa92c6d72cd10d96ccff Mon Sep 17 00:00:00 2001 From: Dave Rolsky Date: Mon, 27 Oct 2014 16:06:26 -0500 Subject: [PATCH] Add docs for all model-returning methods on the Reader class --- src/GeoIp2/Database/Reader.php | 36 ++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/src/GeoIp2/Database/Reader.php b/src/GeoIp2/Database/Reader.php index 8201e1e..442a23e 100644 --- a/src/GeoIp2/Database/Reader.php +++ b/src/GeoIp2/Database/Reader.php @@ -91,6 +91,18 @@ class Reader implements ProviderInterface return $this->modelFor('Country', 'Country', $ipAddress); } + /** + * This method returns a GeoIP2 Connection Type model. + * + * @param string $ipAddress IPv4 or IPv6 address as a string. + * + * @return \GeoIp2\Model\ConnectionType + * + * @throws \GeoIp2\Exception\AddressNotFoundException if the address is + * not in the database. + * @throws \MaxMind\Db\Reader\InvalidDatabaseException if the database + * is corrupt or invalid + */ public function connectionType($ipAddress) { return $this->flatModelFor( @@ -100,6 +112,18 @@ class Reader implements ProviderInterface ); } + /** + * This method returns a GeoIP2 Domain model. + * + * @param string $ipAddress IPv4 or IPv6 address as a string. + * + * @return \GeoIp2\Model\Domain + * + * @throws \GeoIp2\Exception\AddressNotFoundException if the address is + * not in the database. + * @throws \MaxMind\Db\Reader\InvalidDatabaseException if the database + * is corrupt or invalid + */ public function domain($ipAddress) { return $this->flatModelFor( @@ -109,6 +133,18 @@ class Reader implements ProviderInterface ); } + /** + * This method returns a GeoIP2 ISP model. + * + * @param string $ipAddress IPv4 or IPv6 address as a string. + * + * @return \GeoIp2\Model\Isp + * + * @throws \GeoIp2\Exception\AddressNotFoundException if the address is + * not in the database. + * @throws \MaxMind\Db\Reader\InvalidDatabaseException if the database + * is corrupt or invalid + */ public function isp($ipAddress) { return $this->flatModelFor(