Download the PHP package pwweb/copper without Composer

On this page you can find all versions of the php package pwweb/copper. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package copper

Copper

Latest Stable Version Total Downloads License Scrutinizer code quality (GitHub/Bitbucket) StyleCI Status

Copper: An API extension for NumberFormatter.

Installation

Via Composer run the following:

Usage

Commands

This package makes it easy to format numbers using PHP NumberFormatter. In essence it wraps things up in a simple to use API.

To get started you will need to create a new instance:

i.e.:

If you don't provide a $style it will default to NumberFormatter::DECIMAL. If you don't provide the $locale it will default to the value of the Laravel application.

Then with this you can format in any of the following ways:

Format Code Output
Currency $value->currency('GBP') -£1,234.56
Decimal $value->decimal(2) -1,234.56
Percentage $value->percentage() -123,456%
Scientific $value->scientific() -1.23456E3
Accounting $value->accounting('GBP') (£1,234.56)
SpellOut $value->spellOut() minus one thousand two hundred thirty-four point five six

Since the create() function returns an instance of Copper, you can chain the methods together i.e. Copper\Copper::create(-1234.56)->currency('EUR') leads to -€1,234.56.

This means that it's particularly helpful in Blade templates:

{{ Copper\Copper::create($order->value)->currency('USD') }}

In addition to the base functions there are a few setters and getters:

Function Result
setStyle(int) Allows for altering the style value.
getstyle(): int Returns the style number currently defined.
setLocale(string) Allows for changing/specifying the locale within the code i.e. {{ Copper\Copper::create(-1234.56)->setLocale('de-DE')->currency('EUR') }} would return -1.234,56 €.

Change log

Please see the changelog for more information on what has changed recently.

Contributing

Please see contributing.md for details and a todolist.

Security

If you discover any security related issues, please email [email protected] instead of using the issue tracker.

Credits

License

Copyright © pw-websolutions.com. Please see the license file for more information.

˜


All versions of copper with dependencies

PHP Build Version
Package Version
Requires ext-intl Version *
php Version ^8.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package pwweb/copper contains the following files

Loading the files please wait ....