Download the PHP package cxj/validate.address without Composer

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

Validate Address

The United States Postal Service (USPS) Address Standardization Web Tool corrects errors in street addresses, including abbreviations and missing information, and supplies ZIP Codes and ZIP Codes + 4.

This library provides a simple interface to using the above USPS API.

Installation and Autoloading

This package is installable and PSR-4 autoloadable via Composer as cxj/validate.address.

Alternatively, download a release, or clone this repository, then map the Cxj\ValidateAddress\ namespace to the package src/ directory.

Dependencies

This package requires PHP 7.4 or later. We recommend using the latest available version of PHP as a matter of principle.

Example Usage

The main API class for usage is ValidateAddress, the address to be validated or normalized is passed as a Parameter Object or Value Object to the validation method itself. The constructor requires has two other dependencies, defined by the CommunicationInteface (which handles the connection and exchange with the USPS server), and the ResponseParserInterface (which handles decoding the XML response from the server).

Three implementations of the CommunicationInterface are provided, using the PHP Curl extension to send the address request via either HTTP POST or GET, and a stream socket.

Two implementations of the ResponseParserInterface are provided. One requires the PHP DOM extension, and the other requires the PHP XML extension.

Quality

To run the unit tests at the command line, issue composer install and then ./vendor/bin/phpunit at the package root. This requires Composer to be available as composer, and PHPUnit to be available as phpunit.

This package attempts to comply with PSR-1, PSR-2, and PSR-4. If you notice compliance oversights, please send a patch via pull request.


All versions of validate.address with dependencies

PHP Build Version
Package Version
Requires php Version >=7.4
ext-curl Version *
ext-xml Version *
ext-dom Version *
webmozart/assert Version ^1.8
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 cxj/validate.address contains the following files

Loading the files please wait ....