/** * Initialise the object variables */ public function __construct() { $this->oPrediggoConfig = PrediggoConfig::singleton(); $this->oPrediggoRecommendationConfig = PrediggoRecommendationConfig::singleton(); $this->sRepositoryPath = _PS_MODULE_DIR_ . 'prediggo/logs/'; $this->setPagesAccessible(); $this->setPageName(); }
/** * Initialise the object variables */ public function __construct() { $this->name = 'prediggo'; $this->tab = 'front_office_features'; $this->version = '1.8'; $this->author = 'Croissance Net'; $this->need_instance = 1; parent::__construct(); $this->displayName = $this->l('Prediggo'); $this->description = $this->l('Offers interactive products recommendations in the front office'); /* Set the Configuration Object */ $this->oPrediggoConfig = PrediggoConfig::singleton(); $this->oPrediggoExportConfig = PrediggoExportConfig::singleton(); $this->oPrediggoRecommendationConfig = PrediggoRecommendationConfig::singleton(); $this->oPrediggoSearchConfig = PrediggoSearchConfig::singleton(); /* Set the main controllers */ $this->oDataExtractorController = new DataExtractorController($this); $this->oPrediggoCallController = new PrediggoCallController(); $this->aRecommendations = array(); // Check configuration of the server $this->checkServerConfiguration(); }
/** * Get PrediggoRecommendationConfig object instance (Singleton) * * @return object PrediggoRecommendationConfig instance */ public static function singleton() { if (!isset(self::$instance)) { $c = __CLASS__; self::$instance = new $c(); } return self::$instance; }