Skip to content

Commit c486fac

Browse files
committed
update
1 parent da813ae commit c486fac

File tree

2 files changed

+1
-51
lines changed

2 files changed

+1
-51
lines changed

src/ipip/db/Info.php

Lines changed: 0 additions & 40 deletions
This file was deleted.

src/ipip/db/Reader.php

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ private function init()
4949
$text = fread($this->file, $metaLength);
5050

5151
$this->meta = json_decode($text, 1);
52+
5253
if (!isset($this->meta['fields']) || !isset($this->meta['languages']))
5354
{
5455
throw new \Exception('IP Database metadata error.');
@@ -126,17 +127,6 @@ public function findMap($ip, $language = 'CN')
126127
return array_combine($this->meta['fields'], $array);
127128
}
128129

129-
public function findInfo($ip, $language = 'CN')
130-
{
131-
$map = $this->findMap($ip, $language);
132-
if (NULL == $map)
133-
{
134-
return NULL;
135-
}
136-
137-
return new Info($map);
138-
}
139-
140130
/**
141131
* @param $ip
142132
* @return int

0 commit comments

Comments
 (0)