PHPackages                             harp-orm/locations - 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. harp-orm/locations

ActiveLibrary

harp-orm/locations
==================

Regions, Countries and Cities.

0.3.0(11y ago)11341BSD-3-ClausePHPPHP &gt;=5.4.0

Since Jun 26Pushed 11y ago2 watchersCompare

[ Source](https://github.com/harp-orm/locations)[ Packagist](https://packagist.org/packages/harp-orm/locations)[ RSS](/packages/harp-orm-locations/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (3)Dependencies (1)Versions (4)Used By (1)

Locations
=========

[](#locations)

[![Build Status](https://camo.githubusercontent.com/6dda2ce7ab32ec543d0a162c6789d3f07619c5f0308745535d3164c1a76ecb5a/68747470733a2f2f7472617669732d63692e6f72672f686172702d6f726d2f6c6f636174696f6e732e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/harp-orm/locations)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/40d1ea5c4a9c440d7d0543f36c0d59ad6c3fddb50e370a26198ab78f5dc797e9/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f686172702d6f726d2f6c6f636174696f6e732f6261646765732f7175616c6974792d73636f72652e706e67)](https://scrutinizer-ci.com/g/harp-orm/locations/)[![Code Coverage](https://camo.githubusercontent.com/0b9b3fb5e53a23f123c1905fae1f0102ea50f7759cbbbd8223c7c3c8ca931304/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f686172702d6f726d2f6c6f636174696f6e732f6261646765732f636f7665726167652e706e67)](https://scrutinizer-ci.com/g/harp-orm/locations/)[![Latest Stable Version](https://camo.githubusercontent.com/43a460cca0e4189988d4ac9cf5a8ca4dee7d7fb602bb9936dce51617bf21f478/68747470733a2f2f706f7365722e707567782e6f72672f686172702d6f726d2f6c6f636174696f6e732f762f737461626c652e737667)](https://packagist.org/packages/harp-orm/locations)

Regions, Countries and Cities. Hierachical Location struction - you can have regions that encompas countries or cities.

Usage
-----

[](#usage)

Just use the provided models

All locations are saved in a single table, and their relations with one another are handled with [harp-orm/materialized-path](https://github.com/harp-orm/materialized-path)All Models are children of the Locaition model, inhereting its methods.

**Database Tables:**

```
┌─────────────────────────┐
│ Table: Location         │
├─────────────┬───────────┤
│ id          │ ingeter   │
│ name        │ string    │
│ class       │ string    │
│ parentId    │ integer   │
│ path        │ string    │
│ code        │ string    │
└─────────────┴───────────┘

```

Methods
-------

[](#methods)

City, Country, Region and Locaiotn models have some helper methods:

MethodDescription**contains**(Location $location)Check if a given location contains another location, will return true if its a child or is the same location**isRegion**()Return true for Region models and false for everything else**isCountry**()Return true for Country models and false for everything else**isCity**()Return true for City models and false for everything elseLicense
-------

[](#license)

Copyright (c) 2014, Clippings Ltd. Developed by Ivan Kerin

Under BSD-3-Clause license, read LICENSE file.

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity12

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity50

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

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 ~8 days

Total

3

Last Release

4324d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/506129?v=4)[Harry Dobrev](/maintainers/hkdobrev)[@hkdobrev](https://github.com/hkdobrev)

---

Top Contributors

[![ivank](https://avatars.githubusercontent.com/u/4976?v=4)](https://github.com/ivank "ivank (15 commits)")

### Embed Badge

![Health badge](/badges/harp-orm-locations/health.svg)

```
[![Health](https://phpackages.com/badges/harp-orm-locations/health.svg)](https://phpackages.com/packages/harp-orm-locations)
```

PHPackages © 2026

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