PHP Class Laravel\Cashier\Cashier

显示文件 Open project: laravel/cashier-braintree Class Usage Examples

Protected Properties

Property Type Description
$currency string The current currency.
$currencySymbol string The current currency symbol.
$formatCurrencyUsing callable The custom currency formatter.

Public Methods

Method Description
formatAmount ( integer $amount ) : string Format the given amount into a displayable currency.
formatCurrencyUsing ( callable $callback ) : void Set the custom currency formatter.
useCurrency ( string $currency, string | null $symbol = null ) : void Set the currency to be used when billing users.
useCurrencySymbol ( string $symbol ) : void Set the currency symbol to be used when formatting currency.
usesCurrency ( ) : string Get the currency currently in use.
usesCurrencySymbol ( ) : string Get the currency symbol currently in use.

Protected Methods

Method Description
guessCurrencySymbol ( string $currency ) : string Guess the currency symbol for the given currency.

Method Details

formatAmount() public static method

Format the given amount into a displayable currency.
public static formatAmount ( integer $amount ) : string
$amount integer
return string

formatCurrencyUsing() public static method

Set the custom currency formatter.
public static formatCurrencyUsing ( callable $callback ) : void
$callback callable
return void

guessCurrencySymbol() protected static method

Guess the currency symbol for the given currency.
protected static guessCurrencySymbol ( string $currency ) : string
$currency string
return string

useCurrency() public static method

Set the currency to be used when billing users.
public static useCurrency ( string $currency, string | null $symbol = null ) : void
$currency string
$symbol string | null
return void

useCurrencySymbol() public static method

Set the currency symbol to be used when formatting currency.
public static useCurrencySymbol ( string $symbol ) : void
$symbol string
return void

usesCurrency() public static method

Get the currency currently in use.
public static usesCurrency ( ) : string
return string

usesCurrencySymbol() public static method

Get the currency symbol currently in use.
public static usesCurrencySymbol ( ) : string
return string

Property Details

$currency protected_oe static_oe property

The current currency.
protected static string $currency
return string

$currencySymbol protected_oe static_oe property

The current currency symbol.
protected static string $currencySymbol
return string

$formatCurrencyUsing protected_oe static_oe property

The custom currency formatter.
protected static callable $formatCurrencyUsing
return callable