1. Go to this page and download the library: Download luxifer/currency-manager 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/ */
$serializer->configureHandlers(function(JMS\Serializer\Handler\HandlerRegistry $registry) use ($manager) {
$registry->registerSubscribingHandler(new Luxifer\Handler\CurrencyHandler($manager));
});
use JMS\Serializer\Annotation\Type;
class MyObject
{
/**
* @Type("Currency")
*
* will serialize to the currency ISO code
*/
protected $currency;
/**
* @Type("Currency<'symbol'>")
*
* will serialize to the currency symbol
*/
protected $symbol;
}
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.