PHP Class Laravel\Cashier\Cashier

Afficher le fichier Open project: laravel/cashier-braintree Class Usage Examples

Protected Properties

Свойство Type Description
$currency string The current currency.
$currencySymbol string The current currency symbol.
$formatCurrencyUsing callable The custom currency formatter.

Méthodes publiques

Méthode 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.

Méthodes protégées

Méthode Description
guessCurrencySymbol ( string $currency ) : string Guess the currency symbol for the given currency.

Method Details

formatAmount() public static méthode

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

formatCurrencyUsing() public static méthode

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

guessCurrencySymbol() protected static méthode

Guess the currency symbol for the given currency.
protected static guessCurrencySymbol ( string $currency ) : string
$currency string
Résultat string

useCurrency() public static méthode

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

useCurrencySymbol() public static méthode

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

usesCurrency() public static méthode

Get the currency currently in use.
public static usesCurrency ( ) : string
Résultat string

usesCurrencySymbol() public static méthode

Get the currency symbol currently in use.
public static usesCurrencySymbol ( ) : string
Résultat string

Property Details

$currency protected_oe static_oe property

The current currency.
protected static string $currency
Résultat string

$currencySymbol protected_oe static_oe property

The current currency symbol.
protected static string $currencySymbol
Résultat string

$formatCurrencyUsing protected_oe static_oe property

The custom currency formatter.
protected static callable $formatCurrencyUsing
Résultat callable