PHPackages                             nicholasricci/anagrafiche-anpr-istat - 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. [Parsing &amp; Serialization](/categories/parsing)
4. /
5. nicholasricci/anagrafiche-anpr-istat

ActiveLibrary[Parsing &amp; Serialization](/categories/parsing)

nicholasricci/anagrafiche-anpr-istat
====================================

Serialized data of ANPRR and ISTAT

v1.1.0(1y ago)0330CC-BY-4.0PHPPHP &gt;=8.1

Since Aug 7Pushed 1y ago1 watchersCompare

[ Source](https://github.com/nicholasricci/anagrafiche-anpr-istat)[ Packagist](https://packagist.org/packages/nicholasricci/anagrafiche-anpr-istat)[ RSS](/packages/nicholasricci-anagrafiche-anpr-istat/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (2)Dependencies (8)Versions (3)Used By (0)

nicholasricci/anagrafiche-anpr-istat
====================================

[](#nicholasriccianagrafiche-anpr-istat)

Official Italian Belfiore code list (cadastral code) which represents a [comune](https://en.wikipedia.org/wiki/Comune).

Update
------

[](#update)

To update the database, you have to clone the project and install the `dev-dependencies`. Then, the console will be available to download and dump the normalized datasets:

```
composer install
php -d memory_limit=-1 bin/console update

```

and you are golden.

Usage
=====

[](#usage)

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

[](#installation)

### PHP

[](#php)

```
composer require nicholasricci/anagrafiche-anpr-istat

```

Serialized data
---------------

[](#serialized-data)

You can get the up to date serialized database of comunes and foreign regions in CSV, JSON, XML and YAML inside the `dist/` folder in any language.

API
---

[](#api)

### PHP

[](#php-1)

There is a `nicholasricci\AnagraficheANPRISTAT\Collection\ComuneCollection` and a `nicholasricci\AnagraficheANPRISTAT\BelfioreCode\Collection\RegionCollection` to get an `ArrayCollection`filled with both databases. This enables you to directly iterate through them like an array, or even perform queries of columns.

#### Querying

[](#querying)

You can fetch a comune by its `registry_code` (also know as *cadastral code* or *belfiore code*).

```
