示例#1
0
 public function init()
 {
     $id = $this->settingService->get('ga_profile_id');
     if (!$id) {
         $this->error = 'Missing GA profil ID!';
         return;
     }
     $this->analyticsService->setProfileId($id);
     parent::init();
 }
示例#2
0
 public function init()
 {
     $host = $this->settingService->get('shop_database_host');
     $db = $this->settingService->get('shop_database_name');
     $user = $this->settingService->get('shop_database_user');
     $pass = $this->settingService->get('shop_database_password');
     try {
         $this->db = new \PDO('mysql:dbname=' . $db . ';host=' . $host, $user, $pass, array(\PDO::MYSQL_ATTR_INIT_COMMAND => 'SET NAMES \'UTF8\''));
     } catch (\Exception $e) {
         $this->error = "Not a valid database connection!";
         return;
     }
     parent::init();
 }