PHP 클래스 Dumplie\SharedKernel\Domain\Money\Price

파일 보기 프로젝트 열기: dumplie/dumplie 1 사용 예제들

공개 메소드들

메소드 설명
__callStatic ( $method, $arguments ) : Price
__construct ( integer $amount, string $currency, integer $precision = self::DEFAULT_PRECISION )
add ( Price $addend ) : Price
amount ( ) : integer
currency ( ) : string
floatValue ( ) : float
fromInt ( integer $value, string $currency ) : Price
hasCurrency ( string $currency ) : boolean
hasSameCurrency ( Price $price ) : boolean
multiply ( integer $multiplier ) : Price
precision ( ) : integer

메소드 상세

__callStatic() 공개 정적인 메소드

public static __callStatic ( $method, $arguments ) : Price
$method
$arguments
리턴 Price

__construct() 공개 메소드

public __construct ( integer $amount, string $currency, integer $precision = self::DEFAULT_PRECISION )
$amount integer Amount, expressed in the smallest units of $currency (eg cents)
$currency string
$precision integer used to calculate float value, 10000 cents / 100 = 100.00

add() 공개 메소드

public add ( Price $addend ) : Price
$addend Price
리턴 Price

amount() 공개 메소드

public amount ( ) : integer
리턴 integer

currency() 공개 메소드

public currency ( ) : string
리턴 string

floatValue() 공개 메소드

public floatValue ( ) : float
리턴 float

fromInt() 공개 정적인 메소드

public static fromInt ( integer $value, string $currency ) : Price
$value integer
$currency string
리턴 Price

hasCurrency() 공개 메소드

public hasCurrency ( string $currency ) : boolean
$currency string
리턴 boolean

hasSameCurrency() 공개 메소드

public hasSameCurrency ( Price $price ) : boolean
$price Price
리턴 boolean

multiply() 공개 메소드

public multiply ( integer $multiplier ) : Price
$multiplier integer
리턴 Price

precision() 공개 메소드

public precision ( ) : integer
리턴 integer