PHPackages                             phpfacile/geocoding-db-zend - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Database &amp; ORM](/categories/database)
4. /
5. phpfacile/geocoding-db-zend

ActiveLibrary[Database &amp; ORM](/categories/database)

phpfacile/geocoding-db-zend
===========================

Service mainly aimed at storing in database (using zend-db) a location retrieved thanks to phpfacile/geocoding

1.0.4(7y ago)018MITPHPPHP &gt;=7.0.0

Since Nov 7Pushed 7y agoCompare

[ Source](https://github.com/phpfacile/geocoding-db-zend)[ Packagist](https://packagist.org/packages/phpfacile/geocoding-db-zend)[ Docs](https://github.com/phpfacile/geocoding-db-zend)[ RSS](/packages/phpfacile-geocoding-db-zend/feed)WikiDiscussions master Synced 4d ago

READMEChangelogDependencies (5)Versions (6)Used By (0)

PHPFacile! Geocoding-db-zend
============================

[](#phpfacile-geocoding-db-zend)

This service store in database (using zend-db) a location retrieved using phpfacile/geocoding (Cf. ).

Installation
------------

[](#installation)

At the root of your project type

```
composer require phpfacile/geocoding-db-zend

```

Or add "phpfacile/geocoding-db-zend": "^1.0" to the "require" part of your composer.json file

```
"require": {
    "phpfacile/geocoding-db-zend": "^1.0"
}

```

Usage
-----

[](#usage)

### Step 1 : Adapter instanciation

[](#step-1--adapter-instanciation)

Instanciate a Zend Adapter to allow a connexion to a database.

Example with SQLite (for test purpose only)

```
$config = [
    'driver' => 'Pdo_Sqlite',
    'database' => 'my_database.sqlite',
];
$adapter = new Zend\Db\Adapter\Adapter($config);
```

Example with MySQL

```
$config = [
    'driver' => 'Pdo_Mysql',
    'host' => 'localhost'
    'dbname' => 'my_database',
    'user' => 'my_username',
    'password' => 'my_password',
];
$adapter = new Zend\Db\Adapter\Adapter($config);
```

### Step 2 : LocationService instanciation

[](#step-2--locationservice-instanciation)

```
use PHPFacile\Geocoding\Db\Service\LocationService;

$locationService = new LocationService($adapter);
```

### Step 3 : Store a location and/or get it's id if already in database

[](#step-3--store-a-location-andor-get-its-id-if-already-in-database)

Assuming you've got a $location StdClass retrieved from a previous phpfacile/geocoding query:

```
$id = $locationService->getIdOfStdClassLocationAfterInsertIfNeeded($location)
```

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community2

Small or concentrated contributor base

Maturity60

Established project with proven stability

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~3 days

Total

5

Last Release

2731d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/9d6240c88e9505e69bf9ddcd371244851f480013df9c71c496c8d0fcd6de5357?d=identicon)[phpfacile](/maintainers/phpfacile)

---

Tags

geocodingdatabasestoragelocation

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/phpfacile-geocoding-db-zend/health.svg)

```
[![Health](https://phpackages.com/badges/phpfacile-geocoding-db-zend/health.svg)](https://phpackages.com/packages/phpfacile-geocoding-db-zend)
```

###  Alternatives

[itbdw/ip-database

IP数据库 IPV4 IPV6（解析为国家、省、市、县、运营商）

1.5k123.8k7](/packages/itbdw-ip-database)[nevadskiy/laravel-geonames

Populate your database using the GeoNames service.

2715.1k](/packages/nevadskiy-laravel-geonames)[nitecon/zf2-db-session

Zend Framework 2 database session storage

204.8k](/packages/nitecon-zf2-db-session)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
