Download the PHP package coreproc/msisdn-ph without Composer

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

MsisdnPH - PHP

Latest Version on Packagist Build Status Coverage Status Quality Score Total Downloads

Easily validate and manipulate Philippine mobile numbers.

Table of contents

Install

Run the following command at the root of your project (assuming you have Composer and a composer.json file already)

Usage

Validate the mobile number

The validate method cleans the given mobile number and validates it so even if the mobile number is malformed or has other characters within it, it will still return true as long as the number is really valid:

Instantiate an MSISDN object

You can instantiate an MSISDN object and get a standardized format of your mobile number and even get the telco attached to the mobile number using this object.

The MSISDN object will throw an InvalidMsisdnException if you give it an invalid mobile number, so it's best to either catch the exception OR validate it before creating an MSISDN object.

OR

Return a standardized format of your mobile number

When you've instantiated an Msisdn object, you can return the mobile number in any format you want.

Get the telco operator of a mobile number

You can also get the telco operator of the given mobile number - this is based on the included prefixes we have gathered from the telcos.

We cannot guarantee that this list is updated so use with a grain of salt.

If you want to add to the prefixes, you can find the list inside the src/prefixes directory.

Get the prefix of a mobile number

You might just want to get the prefix of a mobile number.

Validating mobile numbers using Laravel 5.1

You can easily integrate this into Laravel's validator class by adding the line below to the default AppServiceProvider located in the app/Providers directory.

Inside the boot() method, add the following line:

Credits

About CoreProc

CoreProc is a software development company that provides software development services to startups, digital/ad agencies, and enterprises.

Learn more about us on our website.

License

The MIT License (MIT). Please see License File for more information.


All versions of msisdn-ph with dependencies

PHP Build Version
Package Version
Requires php Version >=5.4
ext-json Version *
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 coreproc/msisdn-ph contains the following files

Loading the files please wait ....