diff options
author | ctrlaltca <> | 2012-07-12 11:21:01 +0000 |
---|---|---|
committer | ctrlaltca <> | 2012-07-12 11:21:01 +0000 |
commit | 903ae8a581fac1e6917fc3e31d2ad8fb91df80c3 (patch) | |
tree | e08bf04f0823650a231227ac3499121270172a23 /demos/quickstart/protected/pages/Advanced/Samples/I18N/Home.php | |
parent | 3e4e6e66aeb3f8fea4e1eb4237498ef9d2358f63 (diff) |
standardize the use of unix eol; use svn properties to enforce native eol
Diffstat (limited to 'demos/quickstart/protected/pages/Advanced/Samples/I18N/Home.php')
-rw-r--r-- | demos/quickstart/protected/pages/Advanced/Samples/I18N/Home.php | 88 |
1 files changed, 44 insertions, 44 deletions
diff --git a/demos/quickstart/protected/pages/Advanced/Samples/I18N/Home.php b/demos/quickstart/protected/pages/Advanced/Samples/I18N/Home.php index cce1ed4e..634c1773 100644 --- a/demos/quickstart/protected/pages/Advanced/Samples/I18N/Home.php +++ b/demos/quickstart/protected/pages/Advanced/Samples/I18N/Home.php @@ -1,45 +1,45 @@ -<?php
-
-class Home extends TPage
-{
- /**
- * Change the globalization culture using value from request "lang" parameter.
- */
- public function __construct()
- {
- parent::__construct();
- $lang = $this->Request['lang'];
- $info = new CultureInfo();
- if($info->validCulture($lang)) //only valid lang is permitted
- $this->getApplication()->getGlobalization()->setCulture($lang);
- }
-
- /**
- * Initialize the page with some arbituary data.
- * @param TEventParameter event parameter.
- */
- public function onLoad($param)
- {
- parent::onLoad($param);
- $time1 = $this->Time1;
- $time1->Value = time();
-
- $number2 = $this->Number2;
- $number2->Value = 46412.416;
-
- $this->dataBind();
- }
-
- /**
- * Get the localized current culture name.
- * @return string localized curreny culture name.
- */
- public function getCurrentCulture()
- {
- $culture = $this->getApplication()->getGlobalization()->getCulture();
- $cultureInfo = new CultureInfo($culture);
- return $cultureInfo->getNativeName();
- }
-}
-
+<?php + +class Home extends TPage +{ + /** + * Change the globalization culture using value from request "lang" parameter. + */ + public function __construct() + { + parent::__construct(); + $lang = $this->Request['lang']; + $info = new CultureInfo(); + if($info->validCulture($lang)) //only valid lang is permitted + $this->getApplication()->getGlobalization()->setCulture($lang); + } + + /** + * Initialize the page with some arbituary data. + * @param TEventParameter event parameter. + */ + public function onLoad($param) + { + parent::onLoad($param); + $time1 = $this->Time1; + $time1->Value = time(); + + $number2 = $this->Number2; + $number2->Value = 46412.416; + + $this->dataBind(); + } + + /** + * Get the localized current culture name. + * @return string localized curreny culture name. + */ + public function getCurrentCulture() + { + $culture = $this->getApplication()->getGlobalization()->getCulture(); + $cultureInfo = new CultureInfo($culture); + return $cultureInfo->getNativeName(); + } +} + ?>
\ No newline at end of file |