Example #1
0
 public static function getInstance()
 {
     if (self::$Instance == NULL) {
         $class = __CLASS__;
         self::$Instance = new $class();
     }
     return self::$Instance;
 }
Example #2
0
 function __construct()
 {
     global $registry;
     parent::__construct($registry);
     require_once DIR_CONFIG . 'ssb_library/ssb_data.php';
     $this->ssb_data = ssb_data::getInstance();
     require_once DIR_CONFIG . 'ssb_library/ssb_table.php';
     $this->ssb_table = ssb_table::getInstance();
     require_once DIR_CONFIG . 'ssb_library/ssb_helper.php';
     $this->ssb_helper = ssb_helper::getInstance();
     $this->verOC = $this->ssb_helper->getVerOC();
     require_once DIR_CONFIG . 'ssb_library/ssb_category_template.php';
     $this->ssb_category_template = ssb_category_template::getInstance();
 }
Example #3
0
 private function setVars_Common($entity_name, $CPBI, $testgenerator, $additionData = '', $pack = 0)
 {
     $this->seo_data = array();
     $this->g_count = 0;
     $this->testgenerator = $testgenerator;
     $this->pack = $pack;
     $setting = $this->ssb_data->getSetting();
     $this->active_lang_code = $this->ssb_helper->getDefaultLanguage();
     $this->active_language_id = $this->ssb_helper->getLang_Code_Id($this->active_lang_code);
     if ($entity_name != 'STAN_urls') {
         $this->national_lang = isset($setting['entity']['urls']['CPBI_urls']['national_lang']) ? $setting['entity']['urls']['CPBI_urls']['national_lang'] : false;
         $this->CPBI_alias = $this->ssb_data->getMatadata('CPBI', array('val' => 'alias'));
         $meta_CPBI = $this->ssb_data->getMatadata('CPBI', array('val' => 'db_name'));
         $this->CPBI_db_name = $meta_CPBI[$CPBI];
         $this->CPBI_urls_ext = $setting['entity']['urls']['CPBI_urls']['ext'];
         $this->specialPatterns = $this->ssb_data->getPatterns('special');
         $this->condition = isset($additionData['condition']) ? $additionData['condition'] : '';
         if ($CPBI == 'product') {
             require_once DIR_CONFIG . 'ssb_library/ssb_category_template.php';
             $ssb_category_template = ssb_category_template::getInstance();
             $this->category_template = $ssb_category_template->getCategoryTemplate(array('category_entity' => 'urls'), true);
         } else {
             $this->category_template = array();
         }
         $this->gener_lang = isset($additionData['gener_lang']) ? $additionData['gener_lang'] : '';
     } else {
         $this->STAN_urls_data = $setting['entity']['urls']['STAN_urls']['data'];
         $this->STAN_urls_ext = $setting['entity']['urls']['STAN_urls']['ext'];
     }
 }