Page MenuHomeClusterLabs Projects
Diviner Tech Docs PhortuneCurrency

final class PhortuneCurrency
Phorge Technical Documentation (Phortune)

This class is not documented.

Methods

private function __construct()

This method is not documented.
Return
this//Implicit.//

public static function getDefaultCurrency()

This method is not documented.
Return
wild

public static function newEmptyCurrency()

This method is not documented.
Return
wild

public static function newFromUserInput($user, $string)

This method is not documented.
Parameters
PhabricatorUser$user
$string
Return
wild

public static function newFromString($string, $default)

This method is not documented.
Parameters
$string
$default
Return
wild

public static function newFromValueAndCurrency($value, $currency)

This method is not documented.
Parameters
$value
$currency
Return
wild

public static function newFromList($list)

This method is not documented.
Parameters
array$list
Return
wild

public function formatForDisplay()

This method is not documented.
Return
wild

public function serializeForStorage()

This method is not documented.
Return
wild

public function formatBareValue()

This method is not documented.
Return
wild

public function getValue()

This method is not documented.
Return
wild

public function getCurrency()

This method is not documented.
Return
wild

public function getValueInUSDCents()

This method is not documented.
Return
wild

private static function throwFormatException($string)

This method is not documented.
Parameters
$string
Return
wild

private function throwUnlikeCurrenciesException($other)

This method is not documented.
Parameters
PhortuneCurrency$other
Return
wild

public function add($other)

This method is not documented.
Parameters
PhortuneCurrency$other
Return
wild

public function subtract($other)

This method is not documented.
Parameters
PhortuneCurrency$other
Return
wild

public function isEqualTo($other)

This method is not documented.
Parameters
PhortuneCurrency$other
Return
wild

public function negate()

This method is not documented.
Return
wild

public function isPositive()

This method is not documented.
Return
wild

public function isGreaterThan($other)

This method is not documented.
Parameters
PhortuneCurrency$other
Return
wild

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$minimumCurrency string, or null to skip check.
string|null$maximumCurrency string, or null to skip check.
Return
this