Skip to content

Commit

Permalink
Fix comment in I18n
Browse files Browse the repository at this point in the history
Move construction details to a protected constructor.
Fixes #2222
  • Loading branch information
markstory committed Nov 5, 2011
1 parent bfd95d0 commit cd81f9c
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions lib/Cake/I18n/I18n.php
Expand Up @@ -39,9 +39,9 @@
class I18n { class I18n {


/** /**
* Instance of the I10n class for localization * Instance of the L10n class for localization
* *
* @var I10n * @var L10n
*/ */
public $l10n = null; public $l10n = null;


Expand Down Expand Up @@ -91,6 +91,15 @@ class I18n {
'LC_ALL', 'LC_COLLATE', 'LC_CTYPE', 'LC_MONETARY', 'LC_NUMERIC', 'LC_TIME', 'LC_MESSAGES' 'LC_ALL', 'LC_COLLATE', 'LC_CTYPE', 'LC_MONETARY', 'LC_NUMERIC', 'LC_TIME', 'LC_MESSAGES'
); );


/**
* Constructor, use I18n::getInstance() to get the i18n translation object.
*
* @return void
*/
protected function __construct() {
$this->l10n = new L10n();
}

/** /**
* Return a static instance of the I18n class * Return a static instance of the I18n class
* *
Expand All @@ -100,7 +109,6 @@ public static function &getInstance() {
static $instance = array(); static $instance = array();
if (!$instance) { if (!$instance) {
$instance[0] = new I18n(); $instance[0] = new I18n();
$instance[0]->l10n = new L10n();
} }
return $instance[0]; return $instance[0];
} }
Expand Down

0 comments on commit cd81f9c

Please sign in to comment.