Download the PHP package elliotsawyer/nzstreets without Composer

On this page you can find all versions of the php package elliotsawyer/nzstreets. 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 nzstreets

NZ Street Address module for SilverStripe

Address lookup using LINZ Address Data.

Use the 0.0.x tags for SilverStripe 3 installations. SilverStripe 4 support will be handled from versions 0.1.x.

Installation

Add the repository to your composer.json file

Add the project to the require section of composer.json

Setup

Composer should place the repository in your webroot.

Create a new route in routes.yml. You can change address to any url_segment that meets your needs

Download the CSV data source from https://data.linz.govt.nz/layer/3353-nz-street-address/data/

This is a massive file (500+ MB once extracted) and contains over 1.9 million records. The supplied importer will work but it's very slow: you should only use it for a smaller subset of files, or as a last resort for the entire set. For the fastest results, sideload it using mysqladmin or a similar database tool.

Usage

This module was created to feed into an autosuggest address lookup and is suitable for that purpose.

You can now search for addresses that start with your query. For example:

The default limit is 10 results. You can override this in your config.yml:

Each search result contains an AddressID. For more details about an address, you can query by that ID:

Sideloading

Build the table using the dev/build command. You can sideload the CSV file into MySQL with the following query:

Newer versions of MySQL treat this process as a security risk, so you might need to enable a few things on the server and the client to make it happen. Consider reverting these changes after the sideloading process is completed;

Within MySQL at the database level (must be root) SET GLOBAL local_infile=1;

Exit out of MySQL and reconnect with a flag on your client: mysql -u root -p --local-infile=1

Contributing

Contributions are more than welcome! Please raise some issues or create pull requests on the Github repo.

Support

Need some extra help or just love my work? Consider shouting me a coffee or a small donation if this module helped you solve a problem. I accept cryptocurrency at the following addresses:


All versions of nzstreets with dependencies

PHP Build Version
Package Version
Requires silverstripe/framework Version ^4
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 elliotsawyer/nzstreets contains the following files

Loading the files please wait ....