2017 © Pedro Peláez
 

library price-parser

Parse string and return separated price and currency

image

vistag/price-parser

Parse string and return separated price and currency

  • Tuesday, May 1, 2018
  • by vistag
  • Repository
  • 1 Watchers
  • 1 Stars
  • 59 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 4 Versions
  • 0 % Grown

The README.md

Price Parser

Extract price and currency from given string, (*1)

Installation

You can install this package via composer using this command:, (*2)

``` bash composer require vistag/price-parser, (*3)


## Usage ``` php 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., (*4)

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

License

The MIT License (MIT). Vistag.com, (*6)

The Versions

01/05 2018

dev-master

9999999-dev https://github.com/VistagGit/price-parser

Parse string and return separated price and currency

  Sources   Download

MIT

The Requires

  • php ^5.4 || ^7.0

 

The Development Requires

parser currency price

01/05 2018

v1.0.2

1.0.2.0 https://github.com/VistagGit/price-parser

Parse string and return separated price and currency

  Sources   Download

MIT

The Requires

  • php ^5.4 || ^7.0

 

The Development Requires

parser currency price

29/04 2018

v1.0.1

1.0.1.0 https://github.com/VistagGit/price-parser

Parse string and return separated price and currency

  Sources   Download

MIT

The Requires

  • php ^5.4 || ^7.0

 

The Development Requires

parser currency price

01/03 2018

v1.0.0

1.0.0.0 https://github.com/VistagGit/price-parser

Parse string and return separated price and currency

  Sources   Download

MIT

The Requires

  • php ^5.4 || ^7.0

 

The Development Requires

parser currency price