| 123456789101112131415161718192021222324252627282930313233 |
- <?php
- /**
- * This file is part of web3.php package.
- *
- * (c) Kuan-Cheng,Lai <alk03073135@gmail.com>
- *
- * @author Peter Lai <alk03073135@gmail.com>
- * @license MIT
- */
- namespace blockchain\web3\src\Formatters;
- use InvalidArgumentException;
- use blockchain\web3\src\Utils;
- use blockchain\web3\src\Formatters\IFormatter;
- class BigNumberFormatter implements IFormatter
- {
- /**
- * format
- *
- * @param mixed $value
- * @return string
- */
- public static function format($value)
- {
- $value = Utils::toString($value);
- $bn = Utils::toBn($value);
- return $bn;
- }
- }
|