Download the PHP package devnix/belfiore-code without Composer

On this page you can find all versions of the php package devnix/belfiore-code. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package belfiore-code

devnix/belfiore-code

Join the chat at https://gitter.im/DevNIX/belfiore-code

Official Italian Belfiore code list (cadastral code) which represents a comune.

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:

and you are golden.

Anyway, if you think that the crawled data is outdated, please file an issue. I will update the new data ASAP.

Usage

Installation

PHP

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

PHP

There is a Devnix\BelfioreCode\Collection\ComuneCollection and a Devnix\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

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

This would get you a new collection with the matching registry codes. As you can see there is a comune called "ABANO" discontinued in 1924-11-13, and an active comune called "ABANO TERME":

You may want to find an active comune by his registry_code. To archieve this, just play with the Doctrine Collections docs

and it will grab for you your desired criteria:

Ordering

Ordering can be done too through Doctrine Collections. Please refer to their docs to see the available API:

Roadmap

Contributing

You can contribute by forking the project and doing a pull request. Please, do all your work on the develop branch, or your PR will be rejected.

As I would love to get some feedback, specially from people more familiar than me with this kind of data, I will consider it as a WIP, and the API/column names may change in the short term.

Attribution

Inspired by Marketto/codice-fiscale-utils, done to use in conjunction with DavidePastore/codice-fiscale


All versions of belfiore-code with dependencies

PHP Build Version
Package Version
Requires php Version >=7.1
doctrine/collections Version ^1.6
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package devnix/belfiore-code contains the following files

Loading the files please wait ....