Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- class Contaolove extends Controller
- {
- /**
- * Current object instance (Singleton)
- * @var object
- */
- protected static $objInstance;
- /**
- * Contaolove configuration
- * @var object
- */
- public $Config;
- /**
- * Contaolove image
- * @var object
- */
- public $Image;
- /**
- * Set up Contaolove load configuration and image class.
- */
- protected function __construct()
- {
- parent::__construct();
- $this->import('Database');
- $this->import('FrontendUser', 'User');
- $this->setConfiguration();
- // Init Image after loading configuration
- if (TL_MODE == 'FE')
- {
- $this->Image = new CvImage();
- }
- }
- /**
- * Prevent cloning of the object (Singleton)
- */
- final private function __clone() {}
- /**
- * Instantiate a Contaolove object and return it (Factory)
- * @return object
- */
- public static function getInstance()
- {
- if (!is_object(self::$objInstance))
- {
- self::$objInstance = new Contaolove();
- }
- return self::$objInstance;
- }
- /**
- * Set configuration
- * @return void
- */
- public function setConfiguration($intConfiguration)
- {
- $this->Config = new CvConfig((int)$intConfiguration);
- }
- }
- ?>
Add Comment
Please, Sign In to add comment