snapshotpl / ZfSnapGeoip

Maxmind Geoip module for Zend Framework 2
15 stars 4 forks source link

Absent of possibility to get geoiprecord AND geoipdnsrecord #1

Closed vnagara closed 11 years ago

vnagara commented 11 years ago

There should be possibility to get geoiprecord AND geoipdnsrecord that return by GeoIP_record_by_addr() and getrecordwithdnsservice(). I need the stable class for serialization. Or implement serialization.

Make getGeoip() and getRecord() public functions. Thanks.

vnagara commented 11 years ago

I guess It should be re-factored to utilize Record class as entity. In any case I would prefer to see Doctrine ORM logic. That means to get geoip class, through it run 'find($ip)' or 'lookup($ip)' what will return some entity like custom Record (Their can be several types in geoip vendor). And through Entity(Record) gets all properties.

snapshotpl commented 11 years ago

First issue fixed. Check latest changes.

To faster refactor from second comment (which is good idea) please make new issue.

vnagara commented 11 years ago

Hi! Thanks. But why did you this package stable (ver. 1.0) if I wanted base changes in it? I would pull fork and remake it, if I knew that it alive.

Hence your no response I've created geoip-module with base classes what I really needed, but It needs test and README etc. So if you will work at it, I can merge them.

snapshotpl commented 11 years ago

I'll create v2. Tomorrow I'll send code for review

snapshotpl commented 11 years ago

@vnagara check it now! :)

vnagara commented 11 years ago

Yeah! It looks much better. Is the Record class be entity? Can not It be a Document Object for ODM? If I merged them It would be better. I spent about a day to look through mixmind features.

snapshotpl commented 11 years ago

What's different between GeoipModule\Object\Record and ZfSnapGeoip\Entity\Record?