I18Nv2
[ class tree: I18Nv2 ] [ index: I18Nv2 ] [ all elements ]

Class: I18Nv2_Locale

Source Location: /I18Nv2-0.11.4/Locale.php

Class Overview


I18Nv2_Locale


Author(s):

Version:

  • $Revision: 1.31 $

Variables

Methods


Inherited Variables

Inherited Methods


Class Details

[line 54]
I18Nv2_Locale
  • Author: Michael Wallner <mike@php.net>
  • Version: $Revision: 1.31 $
  • Access: public


[ Top ]


Class Variables

$abbrDays = array()

[line 86]

Abbreviated day names
  • Access: protected

Type:   array


[ Top ]

$abbrMonths = array()

[line 94]

Abbreviated month names
  • Access: protected

Type:   array


[ Top ]

$cache = array()

[line 190]

Locale Data Cache
  • Access: protected

Type:   array


[ Top ]

$currencyFormats = array()

[line 134]

Registered currency formats
  • Access: protected

Type:   array


[ Top ]

$currentCurrencyFormat =  null

[line 174]

Current currency format
  • Access: protected

Type:   mixed


[ Top ]

$currentDateFormat =  null

[line 150]

Current date format
  • Access: protected

Type:   mixed


[ Top ]

$currentDateTimeFormat =  null

[line 158]

Current datetime format
  • Access: protected

Type:   mixed


[ Top ]

$currentNumberFormat =  null

[line 166]

Current number format
  • Access: protected

Type:   mixed


[ Top ]

$currentTimeFormat =  null

[line 142]

Current time format
  • Access: protected

Type:   mixed


[ Top ]

$customFormats = array()

[line 182]

Custom formats
  • Access: protected

Type:   array


[ Top ]

$dateFormats = array()

[line 102]

Registered date formats
  • Access: protected

Type:   array


[ Top ]

$dateTimeFormats = array()

[line 118]

Registered datetime formats
  • Access: protected

Type:   array


[ Top ]

$days = array()

[line 70]

Full day names
  • Access: protected

Type:   array


[ Top ]

$initialized =  ''

[line 62]

Initialized Locale
  • Access: protected

Type:   string


[ Top ]

$months = array()

[line 78]

Full month names
  • Access: protected

Type:   array


[ Top ]

$numberFormats = array()

[line 126]

Registered number formats
  • Access: protected

Type:   array


[ Top ]

$paranoid =  false

[line 198]

Whether to reset the global locale after each call
  • Access: protected

Type:   bool


[ Top ]

$timeFormats = array()

[line 110]

Registered time formats
  • Access: protected

Type:   array


[ Top ]

$usedLocale =  ''

[line 206]

Store system locale for paranoid mode
  • Access: protected

Type:   string


[ Top ]



Method Detail

I18Nv2_Locale (Constructor)   [line 214]

I18Nv2_Locale I18Nv2_Locale( [string $locale = null], [ $paranoid = false])

Constructor
  • Access: public

Parameters:

string   $locale   — 
   $paranoid   — 

[ Top ]

date   [line 799]

string date( [int $timestamp = null])

Locale date
  • Access: public

Parameters:

int   $timestamp   — 

[ Top ]

dayName   [line 817]

mixed dayName( int $weekday, [bool $short = false])

Day name
  • Return: Returns &type.string; name of weekday on success or <classname>PEAR_Error</classname> on failure.
  • Access: public

Parameters:

int   $weekday   —  numerical representation of weekday (0 = Sunday, 1 = Monday, ...)
bool   $short   —  whether to return the abbreviation

[ Top ]

formatCurrency   [line 656]

string formatCurrency( numeric $value, [int $overrideFormat = null], [string $overrideSymbol = null])

Format currency
  • Access: public

Parameters:

numeric   $value   — 
int   $overrideFormat   — 
string   $overrideSymbol   — 

[ Top ]

formatDate   [line 730]

string formatDate( [int $timestamp = null], [int $overrideFormat = null])

Format a date
  • Access: public

Parameters:

int   $timestamp   — 
int   $overrideFormat   — 

[ Top ]

formatDateTime   [line 766]

string formatDateTime( [int $timestamp = null], [int $overrideFormat = null])

Format a datetime
  • Access: public

Parameters:

int   $timestamp   — 
int   $overrideFormat   — 

[ Top ]

formatNumber   [line 714]

string formatNumber( numeric $value, [int $overrideFormat = null])

Format a number
  • Access: public

Parameters:

numeric   $value   — 
int   $overrideFormat   — 

[ Top ]

formatTime   [line 748]

string formatTime( [int $timestamp = null], [int $overrideFormat = null])

Format a time
  • Access: public

Parameters:

int   $timestamp   — 
int   $overrideFormat   — 

[ Top ]

initialize   [line 255]

void initialize( $locale)

Initialize
  • Access: public

Parameters:

   $locale   — 

[ Top ]

loadCache   [line 442]

bool loadCache( string $locale)

Load Cache
  • Access: protected

Parameters:

string   $locale   — 

[ Top ]

loadExtension   [line 459]

void loadExtension( )

Loads corresponding locale extension
  • Access: public

[ Top ]

monthName   [line 842]

mixed monthName( int $month, [bool $short = false])

Month name
  • Return: Returns &type.string; name of month on success or <classname>PEAR_Error</classname> on failure.
  • Access: public

Parameters:

int   $month   —  numerical representation of month (0 = January, 1 = February, ...)
bool   $short   —  whether to return the abbreviation

[ Top ]

setCurrencyFormat   [line 510]

mixed setCurrencyFormat( int $format, [bool $custom = false])

Set currency format
  • Return: Returns &true; on success or <classname>PEAR_Error</classname> on failure.
  • Access: public

Parameters:

int   $format   —  a I18Nv2_CURRENCY constant
bool   $custom   —  whether to use a defined custom format

[ Top ]

setCustomFormat   [line 634]

void setCustomFormat( [mixed $type = null], [mixed $format = null])

Set custom format

If $format is omitted, the custom format for $type will be dsicarded - if both vars are omitted all custom formats will be discarded.

  • Access: public

Parameters:

mixed   $type   — 
mixed   $format   — 

[ Top ]

setDateFormat   [line 558]

mixed setDateFormat( int $format, [bool $custom = false])

Set date format
  • Return: Returns &true; on success or <classname>PEAR_Error</classname> on failure.
  • Access: public

Parameters:

int   $format   —  a I18Nv2_DATETIME constant
bool   $custom   —  whether to use a defined custom format

[ Top ]

setDateTimeFormat   [line 606]

mixed setDateTimeFormat( int $format, [bool $custom = false])

Set datetime format
  • Access: public

Parameters:

int   $format   —  a I18Nv2_DATETIME constant
bool   $custom   —  whether to use a defined custom format

[ Top ]

setDefaults   [line 478]

void setDefaults( )

Set defaults
  • Access: public

[ Top ]

setLocale   [line 231]

string setLocale( string $locale, [bool $force = false])

Set locale

This automatically calls I18Nv2_Locale::initialize()

  • Return: used system locale
  • Access: public

Parameters:

string   $locale   — 
bool   $force   — 

[ Top ]

setNumberFormat   [line 534]

mixed setNumberFormat( int $format, [bool $custom = false])

Set number format
  • Return: Returns &true; on success or <classname>PEAR_Error</classname> on failure.
  • Access: public

Parameters:

int   $format   —  a I18Nv2_NUMBER constant
bool   $custom   —  whether to use a defined custom format

[ Top ]

setParanoid   [line 496]

void setParanoid( [bool $paranoid = false])

Set Paranoid Mode

Whether to reset to the C-locale after every call.

  • Access: public

Parameters:

bool   $paranoid   —  Whether to enable paranoid mode.

[ Top ]

setTimeFormat   [line 582]

mixed setTimeFormat( int $format, [bool $custom = false])

Set time format
  • Access: public

Parameters:

int   $format   —  a I18Nv2_DATETIME constant
bool   $custom   —  whether to use a defined custom format

[ Top ]

time   [line 784]

string time( [int $timestamp = null])

Locale time
  • Access: public

Parameters:

int   $timestamp   — 

[ Top ]

updateCache   [line 420]

void updateCache( string $locale)

Update Cache
  • Access: protected

Parameters:

string   $locale   — 

[ Top ]


Documentation generated on Mon, 11 Mar 2019 14:38:13 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.