コード例 #1
0
 public static function getInstance()
 {
     if (self::$instance === null) {
         self::$instance = new self();
     }
     return self::$instance;
 }
コード例 #2
0
 private function getSettingsFromDB()
 {
     $selectBuilder = new Gpf_SqlBuilder_SelectBuilder();
     $selectBuilder->select->add(Gpf_Db_Table_Settings::NAME, Gpf_Db_Table_Settings::NAME);
     $selectBuilder->select->add(Gpf_Db_Table_Settings::VALUE, Gpf_Db_Table_Settings::VALUE);
     $selectBuilder->from->add(Gpf_Db_Table_Settings::getName());
     return $selectBuilder;
 }
コード例 #3
0
    public function execute() {
        $this->createDatabase()->execute('ALTER TABLE  `qu_pap_campaigns` ADD  `longdescription` TEXT NULL');

        $select = new Gpf_SqlBuilder_SelectBuilder();
        $select->select->addAll(Gpf_Db_Table_Settings::getInstance());
        $select->from->add(Gpf_Db_Table_Settings::getName());
        $select->where->add(Gpf_Db_Table_Settings::NAME, '=', 'default_campaign_id');
        try {
            $result = $select->getOneRow();
            $previousDefaultCampaign = $result->get(Gpf_Db_Table_Settings::VALUE);
            $campaignForm = new Pap_Merchants_Campaign_CampaignForm();
            $campaignForm->setCampaignDefault($previousDefaultCampaign);
        } catch (Gpf_DbEngine_NoRowException $e) {
        }

        $this->createDatabase()->execute('ALTER TABLE `qu_pap_campaigns` DROP `longdescription`');
    }
コード例 #4
0
ファイル: Core.php プロジェクト: AmineCherrai/rostanvo
 function init()
 {
     $this->setTable(Gpf_Db_Table_Settings::getInstance());
     parent::init();
 }
コード例 #5
0
ファイル: Base.class.php プロジェクト: AmineCherrai/rostanvo
 protected function loadDbSetting($name)
 {
     try {
         $this->cache[$name] = Gpf_Db_Table_Settings::getSetting($name, $this->accountId);
     } catch (Gpf_Settings_UnknownSettingException $e) {
         $this->cache[$name] = $this->defines->getDefaultValue($name);
     }
 }