2017 © Pedro Peláez
 

cakephp-plugin phone-helper

A CakePHP 3.x telephone number formatting plugin.

image

potatopowered/phone-helper

A CakePHP 3.x telephone number formatting plugin.

  • Monday, May 8, 2017
  • by KaffineAddict
  • Repository
  • 2 Watchers
  • 8 Stars
  • 804 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 3 Versions
  • 3 % Grown

The README.md

Phone Helper

Software License Travis Codecov Scrutinizer Packagist, (*1)

A phone number formatting helper for CakePHP 3.x, (*2)

Description

The phone number helper is designed to help format phone numbers of all types into tel links or just a prettified format. Please send a pull request if you do not see your phone number format included., (*3)

Installation

composer require potatopowered/phone-helper

Add the helper to the public helpers variable of the controller you need it on or in the AppController to have it accessible in all controllers., (*4)

public $helpers = [
    'Phone' => [
        'className' => 'PhoneHelper.Phone'
    ]
];

Usage

To use the phone number formatter you must have the helper loaded in your controller. Once loaded in the controller as shown above you can call the number helper's format($number) function., (*5)

// (123) 456-789
$this->Phone->format('1234567890');

// 456-7890
$this->Phone->format('4567890');

You can also add telephone links in RFC3966 format using the 'link' method, (*6)

// <a href="tel:+1234567890">123-456-7890</a>
$this->Phone->link('123-456-7890');

// <a href="tel:+1234567890">Call Us</a>
$this->Phone->link(h('Call Us'), '1234567890');

The Versions

08/05 2017

dev-master

9999999-dev

A CakePHP 3.x telephone number formatting plugin.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Blake Sutton

helper number phone telephone

30/09 2016

v2.0.0

2.0.0.0

A CakePHP 3.x telephone number formatting plugin.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Blake Sutton

helper number phone telephone

20/02 2016

v1.0.0

1.0.0.0

A CakePHP 3.x telephone number formatting plugin.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Blake Sutton

helper number phone telephone