Download the PHP package rogervila/moneyphp-operations without Composer

On this page you can find all versions of the php package rogervila/moneyphp-operations. 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 moneyphp-operations

MoneyPHP Operations

Build Status StyleCI Quality Gate Status

Latest Stable Version Total Downloads License

MoneyPHP Operations

MoneyPHP Operations provides a set of powerful helpers to manipulate and format money using MoneyPHP.

Installation

Usage

Initialization

You can initialize an Operation instance using an existing Money object or directly from values.


Percentage Operations

Increase

Increase the amount by a given percentage.

Decrease

Decrease the amount by a given percentage. Supports both positive and negative percentage strings.

Difference

Calculate the percentage difference between two Money objects.


Collection Operations

Split

Split a Money object into multiple parts. It ensures the sum of parts equals the original amount by adding the remainder to the first part.

Join

Combine an array of Money objects back into a single Money object.

Assert Split

Verify if an array of Money objects correctly totals the original instance.

Average

Calculate the average value of a collection of Money objects.


Formatting and Parsing

Formatting

Format a Money object to a localized string. Requires the intl extension.

Parsing

Parse a localized currency string into a Money object.

To Decimal

Convert a Money object to a float representation.


Factory

Create Money instances easily.

Rounding Modes

Most operations accept an optional $roundingMode parameter. By default, it uses Money::ROUND_HALF_UP.

Available modes (from MoneyPHP):

Exceptions

Methods may throw \MoneyOperation\Exceptions\InvalidOperationException in cases like:

Author

Created by Roger Vilà

License

MoneyPHP Operations is open-sourced software licensed under the MIT license.

Icons made by Prosymbols Premium from www.flaticon.es


All versions of moneyphp-operations with dependencies

PHP Build Version
Package Version
Requires moneyphp/money Version ^4.1
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 rogervila/moneyphp-operations contains the following files

Loading the files please wait ...