. * * PHP version 5 * @copyright cgo IT, 2012-2013 * @author Carsten Götzinger (info@cgo-it.de) * @package aeo * @license GNU/LGPL * @filesource */ namespace cgoIT\aeo; /** * Class AeoJavaScript */ class AeoJavaScript { /** * Current object instance (Singleton) * @var Cache */ protected static $objInstance; /** * Template * @var string */ protected static $strTemplate = 'js_aeo_deobfuscate'; /** * Prevent direct instantiation (Singleton) */ protected function __construct() {} /** * Prevent cloning of the object (Singleton) */ final private function __clone() {} public function getContent($folder, $rot13 = true) { $Template = new \FrontendTemplate(self::$strTemplate); $Template->rot13 = $rot13; $Template->folder = $folder; $Template->tooltip_js_on = $GLOBALS['TL_LANG']['aeo']['tooltip_js']; $Template->tooltip_js_off = $GLOBALS['TL_LANG']['aeo']['tooltip_no_js']; return $Template->parse(); } /** * Instantiate a new cache object and return it (Factory) * @return Cache */ public static function getInstance() { if (!is_object(self::$objInstance)) { self::$objInstance = new self(); } return self::$objInstance; } } ?>