Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fix comment in I18n

Move construction details to a protected constructor.
Fixes #2222
  • Loading branch information...
commit cd81f9c30abad0199577c8336bc4ca1212628759 1 parent bfd95d0
@markstory markstory authored
Showing with 11 additions and 3 deletions.
  1. +11 −3 lib/Cake/I18n/I18n.php
View
14 lib/Cake/I18n/I18n.php
@@ -39,9 +39,9 @@
class I18n {
/**
- * Instance of the I10n class for localization
+ * Instance of the L10n class for localization
*
- * @var I10n
+ * @var L10n
*/
public $l10n = null;
@@ -92,6 +92,15 @@ class I18n {
);
/**
+ * 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 I18n
@@ -100,7 +109,6 @@ public static function &getInstance() {
static $instance = array();
if (!$instance) {
$instance[0] = new I18n();
- $instance[0]->l10n = new L10n();
}
return $instance[0];
}

0 comments on commit cd81f9c

Please sign in to comment.
Something went wrong with that request. Please try again.