vistag/price-parser 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

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

vistag/price-parser

Composer 安装命令:

composer require vistag/price-parser

包简介

Parse string and return separated price and currency

README 文档

README

Extract price and currency from given string

Installation

You can install this package via composer using this command:

 composer require vistag/price-parser

Usage

use Vistag\PriceParser\PriceParser;


$priceParser = new PriceParser('120 Kč');

$priceParser->getPrice();
// 120
$priceParser->getCurrency();
// CZK


$priceParser = new PriceParser('$ 1,210,000.10');

$priceParser->getPrice();
// 1210000.1
$priceParser->getCurrency();
// USD


$priceParser = new PriceParser('foobar');

$priceParser->isValid();
// false


$priceParser = new PriceParser('12312');

$priceParser->isValid();
// true
$priceParser->getPrice();
// 12312
$priceParser->getCurrency();
// null

Support

If you believe you have found an issue, please report it using the GitHub issue tracker, or better yet, fork the repository and submit a pull request.

If you're using this package, I'd love to hear your thoughts. Thanks!

License

The MIT License (MIT). Vistag.com

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2018-01-29

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固