Download the PHP package duffleman/vrm without Composer

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

vrm

Coerces, validates and prettifies vehicle registration marks (VRMs). Presently, only UK DVLA registration plate formats are supported. Please open an issue if you'd like to see support added for other driving authorities' formats - I'd be keen to work with you to enable this.

Installation

API

VRM::coerce($input[, $allowedFormats])

Coerces the input into a set of possible VRMs which the input could represent. See more information below about why this is needed.

The returned array contains the VRM details for each given format, sorted in order of likelihood, where the most likely format is the first value.

If the allowed formats are specified, coercion will be limited to these formats. Any other formats will not be checked.

Returns an empty array if the input is invalid or cannot be coerced into any of the formats checked.

Throws if any of the allowed formats are not known.

VRM::info($normalizedVRM[, $format])

Verifies that the given VRM matches one of the known formats and returns the relevant VRM details. Only normalized VRMs are accepted.

If the format is specified, only that format is checked.

Returns null if the VRM does not match any of the formats checked.

Throws if the provided format is not known.

Notes

Formats

The known formats are referenced as the following strings:

VRM Details

The VRM details objects returned include the following information:

More information is likely to be added to this object over time. These changes would not be considered as 'breaking'.

Coercion

UK registration plates use a particular official typeface which was designed by Charles Wright. Bizarrely, it uses exactly the same physical shape for I and 1, and for O and 0. This means that the exact VRM can be ambiguous and people often mistype the VRM into forms. Additionally, it presents some difficulties for automatic number plate recognition (ANPR) systems.

The coerce method handles this. It returns an array because (occasionally) multiple formats can be possible.

The returned array is ordered with the original input first if it is valid, followed by the other valid options with the newer formats coming first. This behavior could change though, so don't rely on it.

Possible Additions

If there is demand for it, two other bits of functionality could be provided:

Data Sources

Support

Please open an issue on this repository.

Authors

License

MIT licensed - see LICENSE file


All versions of vrm with dependencies

PHP Build Version
Package Version
Requires php Version >=7.0
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 duffleman/vrm contains the following files

Loading the files please wait ....