Permalink
Browse files

Minor syntax change to Locale.php

  • Loading branch information...
1 parent d924277 commit 92b44bfbc9f419ce1b83fb97990dcd66614f8e5f @balupton balupton committed Jan 2, 2011
Showing with 9 additions and 8 deletions.
  1. +9 −8 lib/Bal/Locale.php
View
@@ -74,8 +74,9 @@ public function __construct ( $locale = null, $currency = null, $timezone = null
}
# Prepare Dependencies
- if ( !$_SERVER['CLI'] )
+ if ( !$_SERVER['CLI'] ) {
$this->Session = new Zend_Session_Namespace('Application');
+ }
$this->Zend_Locale = new Zend_Locale();
$this->il8n_path = IL8N_PATH;
@@ -97,7 +98,7 @@ public function __construct ( $locale = null, $currency = null, $timezone = null
}
# Apply the Locale Preference
- if ( $this->Session )
+ if ( $this->Session )
$this->Session->locale = $locale = $this->getFullLocale();
# Apply the Zend_Locale Dependency
@@ -142,7 +143,7 @@ public static function getInstance ( ) {
* @return Bal_Locale
*/
public function clearLocale() {
- # Clear
+ # Clear
if ( $this->Session )
$this->Session->locale = null;
@@ -424,12 +425,12 @@ protected function _translate_advanced ( $text ) {
$value = $parts[2];
} else {
$value = $match_str;
- }
-
- # Check
+ }
+
+ # Check
if ( !method_exists($this, $translator) ) {
throw new Bal_Exception('Translate advanced was passed invalid arguments...');
- }
+ }
# Apply the translator
$result = $this->$translator($value);
@@ -708,7 +709,7 @@ public function float ( $number, $options = array() ) {
public function string ( ) {
$args = func_get_args();
return call_user_func_array(array($this,'translate'), $args);
- }
+ }
/**
* Translate a string

0 comments on commit 92b44bf

Please sign in to comment.