1. Go to this page and download the library: Download wexample/symfony-money library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
wexample / symfony-money example snippets
class Product implements PricedInterface, VatRatedInterface
{
use PricedSingleTrait; // priceRaw, priceTotal, priceOverridden
use HasPriceVatTrait; // priceVat
}
class Order implements PricedParentInterface, DiscountedInterface
{
use PricedParentTrait; // sums its children
use HasPriceDiscountTrait; // money or percent, spread over the VAT bases
}
class OrderLine implements PricedChildInterface, QuantifiedInterface, VatRatedInterface
{
use PricedChildTrait; // refreshes its parent
use HasQuantityTrait; // scaled by getQuantityScale(): 100 lets 150 mean 1.5
use HasPriceVatTrait;
}
class WexampleSymfonyMoneyBundle extends AbstractBundle implements PseudocodeBundleInterface, LoaderBundleInterface
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.