From 14691cd854be3e9ee272c9619a6368c83d72267b Mon Sep 17 00:00:00 2001 From: Antonio Gallo Date: Sat, 18 Feb 2012 00:07:50 +0000 Subject: upload new EasyGiant library and added added a new filter for the model name (part 2) --- h-source/Library/Factory/Strings.php | 38 ++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 h-source/Library/Factory/Strings.php (limited to 'h-source/Library/Factory/Strings.php') diff --git a/h-source/Library/Factory/Strings.php b/h-source/Library/Factory/Strings.php new file mode 100644 index 0000000..3e766bd --- /dev/null +++ b/h-source/Library/Factory/Strings.php @@ -0,0 +1,38 @@ +. + +if (!defined('EG')) die('Direct access not allowed!'); + +//return the string class +class Factory_Strings { + + //return an instance of the Lang_{language}_Generic class + public static function generic($lang = 'En') { + $stringClass = 'Lang_'.$lang.'_Generic'; + if (!class_exists($stringClass)) + { + $stringClass = 'Lang_En_Generic'; + } + return new $stringClass(); + } + +} -- cgit v1.2.3