承接 potatopowered/phone-helper 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

potatopowered/phone-helper

Composer 安装命令:

composer require potatopowered/phone-helper

包简介

A CakePHP 3.x telephone number formatting plugin.

README 文档

README

Software License Travis Codecov Scrutinizer Packagist

A phone number formatting helper for CakePHP 3.x

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.

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.

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.

// (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

// <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');

统计信息

  • 总下载量: 12.52k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 8
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 8
  • Watchers: 2
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2016-02-20

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固