Download the PHP
package alwaysblank/rotary without Composer
On this page you can find all versions of the php package
alwaysblank/rotary. It is possible to download/install
these versions without Composer. Possible dependencies are resolved
automatically.
Vendor alwaysblank Package rotary Short Description Handle phone numbers. License
MIT
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.
Rotary will support numbers that look like the standard number format used in the United State of America, i.e. nnn-nnnn or nnn nnn-nnnn. These can also be prepended with an international country code up to 5 digit long, i.e. nn nnn nnn-nnnn. Numbers that deviate from this pattern cannot be reliably interpreted.
Usage 💪
Although all the internal behaviors are easily accessible (with the exception of the Number class, all methods are available as static methods), in general, you'll just be using these methods from the Render class:
pretty will result in (123) 456-7890 or 456-7890.
simple will result in 123 456-7890 or 456-7890.
href will result in tel:+11234567890 or tel:+14567890.
normalized will result in 1234567890 or 567890.
You can call them like this:
You can also instantiate a Rotary object, which has methods for the different format types:
This can be useful if you want access to several formats on one number.
You can put any non-digit characters you like in your argument and Rotary will simply ignore them--it cares only for digits. 234-5678 and 2dfsad__34-5)(6=78 are identical so far as it's concerned.
Note: Rotary will try to interpret strange arguments, but it has limits, so please try to pass it numbers that make sense. 🙏
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 alwaysblank/rotary contains the following files
Loading the files please wait ....
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.