定制 messer/mask 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

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

messer/mask

最新稳定版本:1.5.4

Composer 安装命令:

composer require messer/mask

包简介

PHP Value Masker by Gustavo Messer

README 文档

README

License: MIT

Goldbach Algorithms Mask (old repository) is a PHP library developed for Symfony for apply a mask to values.

Installation

Use the composer to install:

composer require messer/mask

Usage

It is possible to mask a string to one of the default settings or create a customization from the custom() method.

# add use Mask
use GoldbachAlgorithms\Mask\Mask;

# create a new mask
$mask = new Mask();

# returns '89566-410'
$mask->cep('89566410');

# returns '198.298.398-98'
$mask->cpf('19829839898');

# returns '03.635.359/0001-23'
$mask->cnpj('3635359000123');

# returns '12.345.678-9'
$mask->rg('123456789');

# returns '4321.****.****.1234'
$mask->creditCard('4321544534421234');

# returns '(11) 3227-3158'
$mask->phone('1132273158');

# returns '(21) 99943-2343'
$mask->phone('21999432343');

# returns '18/03/1690'
$mask->custom('18031690','##/##/####');

License

MIT

Copyright © 2023 Gustavo Messer

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2023-05-12