SproutCMS

This is the code documentation for the SproutCMS project

Page options:

Inherited members

class LocaleInfoBOL

Locale info for Bolivia; see LocaleInfo

Variables

NameVisibilityDescription
$auto (static) 
$currency_decimal 
$currency_name 
$currency_symbol 
$decimal_seperator 
$group_seperator 
$line1 
$line2 
$longdate 
$postcode_name 
$shortdate 
$state_list 
$state_name 
$time 
$town_name 

Functions

NameVisibilityDescription
autopublic (static)Automatically chooses a locale and returns it
getpublic (static)Returns the LocaleInfo class for the specified country code.
getCurrencyNamepublicThe name of the currency, e.g. 'Dollar' for $
getParameterspublicReturn the raw parameters of this locale
getStateListpublicGets a list of states
getStateNamepublicGet the name of a given state by looking it up in the states list
longdatepublicFormats dates in a long format
moneyFormatpublicFormats currency values, similar to the interal number_format function
nonNumericStatespublicOrganises the state list so that it doesn't have numeric keys.
numberFormatpublicFormats numbers, like the interal number_format function
outputAddressFieldpublicGenerates a single address field for the current locale
outputAddressFieldspublicGenerates the address fields for the current locale
outputAddressTextpublicReturns a string which is a formatted version of the address specified using the provided data.
shortdatepublicFormats dates in a short format
stateValuespublicExtracts only the enterable values from the state list
timepublicFormats times
validateAddresspublicValidate address fields

public auto (from LocaleInfo)

LocaleInfo LocaleInfo::auto ( );

Automatically chooses a locale and returns it

public get (from LocaleInfo)

LocaleInfo LocaleInfo::get ( [ string $code ] );

Returns the LocaleInfo class for the specified country code.
If no LocaleInfo can be found, a generic version is used.

public getCurrencyName (from LocaleInfo)

string $LocaleInfo->getCurrencyName ( );

The name of the currency, e.g. 'Dollar' for $

public getParameters (from LocaleInfo)

unknown $LocaleInfo->getParameters ( );

Return the raw parameters of this locale

public getStateList (from LocaleInfo)

array $LocaleInfo->getStateList ( );

Gets a list of states

public getStateName (from LocaleInfo)

null|string $LocaleInfo->getStateName ( string $val );

Get the name of a given state by looking it up in the states list

public longdate (from LocaleInfo)

string $LocaleInfo->longdate ( int $timestamp );

Formats dates in a long format

public moneyFormat (from LocaleInfo)

string $LocaleInfo->moneyFormat ( int|float $number [, int $precision ] );

Formats currency values, similar to the interal number_format function

public nonNumericStates (from LocaleInfo)

array $LocaleInfo->nonNumericStates ( );

Organises the state list so that it doesn't have numeric keys.

The state names become the form field values if state list is a numeric array.
This makes it easy to configure a new locate with states/provinces/etc which don't have standard abbreviations.

E.g. ['State 1', 'State 2'] would become: ['State 1' => 'State 1', 'State 2' => 'State 2']

public numberFormat (from LocaleInfo)

string $LocaleInfo->numberFormat ( int|float $number [, int $precision ] );

Formats numbers, like the interal number_format function

public outputAddressField (from LocaleInfo)

string $LocaleInfo->outputAddressField ( string $field [, string $prefix [, bool $required ]] );

Generates a single address field for the current locale

public outputAddressFields (from LocaleInfo)

string $LocaleInfo->outputAddressFields ( [ string $prefix [, bool $required ]] );

Generates the address fields for the current locale

public outputAddressText (from LocaleInfo)

string $LocaleInfo->outputAddressText ( array|object $data );

Returns a string which is a formatted version of the address specified using the provided data.
The string contains newlines which will need converting to BRs for HTML output

public shortdate (from LocaleInfo)

string $LocaleInfo->shortdate ( int $timestamp );

Formats dates in a short format

public stateValues (from LocaleInfo)

array $LocaleInfo->stateValues ( );

Extracts only the enterable values from the state list

This should be used for validation.

public time (from LocaleInfo)

string $LocaleInfo->time ( int $timestamp );

Formats times

public validateAddress (from LocaleInfo)

void $LocaleInfo->validateAddress ( Validator $valid [, bool $required ] );

Validate address fields