private function __construct()
private function __construct()
Return
this | //Implicit.// |
public static function getDefaultCurrency()
public static function getDefaultCurrency()
Return
wild |
public static function newEmptyCurrency()
public static function newEmptyCurrency()
Return
wild |
public static function newFromUserInput($user, $string)
public static function newFromUserInput($user, $string)
Parameters
PhabricatorUser | $user | |
$string |
Return
wild |
public static function newFromString($string, $default)
public static function newFromString($string, $default)
Parameters
$string | ||
$default |
Return
wild |
public static function newFromValueAndCurrency($value, $currency)
public static function newFromValueAndCurrency($value, $currency)
Parameters
$value | ||
$currency |
Return
wild |
public static function newFromList($list)
public static function newFromList($list)
Parameters
array | $list |
Return
wild |
public function formatForDisplay()
public function formatForDisplay()
Return
wild |
public function serializeForStorage()
public function serializeForStorage()
Return
wild |
public function formatBareValue()
public function formatBareValue()
Return
wild |
public function getValue()
public function getValue()
Return
wild |
public function getCurrency()
public function getCurrency()
Return
wild |
public function getValueInUSDCents()
public function getValueInUSDCents()
Return
wild |
private static function throwFormatException($string)
private static function throwFormatException($string)
Parameters
$string |
Return
wild |
private function throwUnlikeCurrenciesException($other)
private function throwUnlikeCurrenciesException($other)
Parameters
PhortuneCurrency | $other |
Return
wild |
public function add($other)
public function add($other)
Parameters
PhortuneCurrency | $other |
Return
wild |
public function subtract($other)
public function subtract($other)
Parameters
PhortuneCurrency | $other |
Return
wild |
public function isEqualTo($other)
public function isEqualTo($other)
Parameters
PhortuneCurrency | $other |
Return
wild |
public function negate()
public function negate()
Return
wild |
public function isPositive()
public function isPositive()
Return
wild |
public function isGreaterThan($other)
public function isGreaterThan($other)
Parameters
PhortuneCurrency | $other |
Return
wild |
public function assertInRange($minimum, $maximum)
public function assertInRange($minimum, $maximum)
Assert that a currency value lies within a range.
Throws if the value is not between the minimum and maximum, inclusive.
In particular, currency values can be negative (to represent a debt or credit), so checking against zero may be useful to make sure a value has the expected sign.
Parameters
string|null | $minimum | Currency string, or null to skip check. |
string|null | $maximum | Currency string, or null to skip check. |
Return
this |