当前位置: 首页>>代码示例>>PHP>>正文


PHP Db::__construct方法代码示例

本文整理汇总了PHP中Db::__construct方法的典型用法代码示例。如果您正苦于以下问题:PHP Db::__construct方法的具体用法?PHP Db::__construct怎么用?PHP Db::__construct使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Db的用法示例。


在下文中一共展示了Db::__construct方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: __construct

 public function __construct(array $db_settings, RegistryInterface $registry)
 {
     $db_setting = array('server' => $db_settings['server'], 'database' => $db_settings['db'], 'username' => $db_settings['db_cred']['user']['user'], 'password' => $db_settings['db_cred']['user']['password']);
     //I know; the credentials seem too long
     parent::__construct($db_setting);
     $this->registry = $registry;
 }
开发者ID:General-ZOD,项目名称:eduvideo,代码行数:7,代码来源:dbcategories.php

示例2: __construct

 public function __construct()
 {
     parent::__construct();
     if (!isset($_GET['action'])) {
         $this->drawTable();
     } else {
         switch ($_GET['action']) {
             case 'create':
                 $this->createPromo();
                 break;
             case 'save':
                 $this->savePromo($_GET['id']);
                 break;
             case 'edit':
                 $this->drawTableID($_GET['id']);
                 $this->selected_id = $_GET['id'];
                 break;
             case 'delete':
                 $this->deletePromo($_GET['id']);
                 break;
             default:
                 break;
         }
     }
     $this->drawList();
     $this->CKEditor();
     $this->bottomSpace();
 }
开发者ID:davidkonrad,项目名称:allearter,代码行数:28,代码来源:ajax_promo.php

示例3: __construct

 public function __construct()
 {
     parent::__construct();
     $this->action = isset($_GET['vis']) ? $_GET['vis'] : false;
     $this->artsgruppe = isset($_GET['artsgruppe']) ? $_GET['artsgruppe'] : false;
     switch ($this->action) {
         case 'total':
             $this->total();
             break;
         case 'arter':
             $this->arter();
             break;
         case 'select':
             $this->select();
             break;
         case 'klassifikation':
             $this->klassifikation();
             break;
         case 'referencer':
             $this->referencer();
             break;
         default:
             break;
     }
 }
开发者ID:davidkonrad,项目名称:allearter,代码行数:25,代码来源:index.php

示例4: __construct

 public function __construct()
 {
     parent::__construct();
     $this->drawHeader();
     $this->loadData();
     $this->populate();
 }
开发者ID:davidkonrad,项目名称:allearter,代码行数:7,代码来源:19082012_search.php

示例5: __construct

 public function __construct($dbHost = null)
 {
     parent::__construct($dbHost);
     if (is_null($this->dbhost)) {
         die("MySQL hostname not set");
     } else {
         if (is_null($this->dbname)) {
             die("MySQL database not selected");
         } else {
             if (is_null($this->dbuser)) {
                 die("MySQL hostname not set");
             } else {
                 if (is_null($this->dbpwd)) {
                     die("MySQL pwd not currect");
                 }
             }
         }
     }
     if (!$this->link_id) {
         $this->link_id = mysql_connect($this->hostname, $this->dbuser, $this->dbpwd);
     }
     mysql_query("SET NAMES UTF-8", $this->link_id);
     if ($this->dbname) {
         mysql_select_db($this->dbname, $this->link_id);
     }
 }
开发者ID:hoogle,项目名称:ttt,代码行数:26,代码来源:db_mysql_FIXME.php

示例6: __construct

 public function __construct()
 {
     parent::__construct();
     if (!isset($_GET['action'])) {
         echo 'Programfejl ..';
         return;
     }
     switch ($_GET['action']) {
         case 'backup':
             $this->createBackup();
             break;
         case 'showtables':
             $this->showTables();
             break;
         case 'updateDK':
             $this->updateDK();
             break;
         case 'updateCRLF':
             $this->updateCRLF();
             break;
         case 'restoreBackup':
             $this->restoreBackup();
             break;
         default:
             return;
     }
 }
开发者ID:davidkonrad,项目名称:allearter,代码行数:27,代码来源:ajax_db.php

示例7: __construct

 public function __construct($ssTabaleName = '', $ssAlias = '', $ssPrimaryKey = '')
 {
     $this->ssTableName = $ssTabaleName;
     $this->ssAlias = $ssAlias;
     $this->ssPrimaryKey = $ssPrimaryKey;
     parent::__construct();
 }
开发者ID:hardikpatel1644,项目名称:phpoops,代码行数:7,代码来源:model.php

示例8: __construct

 public function __construct()
 {
     try {
         parent::__construct();
     } catch (MysqlException $e) {
         Html::showAll($e);
     }
 }
开发者ID:HuMMeL621,项目名称:KBO,代码行数:8,代码来源:class.lehrer.php

示例9: __construct

 public function __construct()
 {
     parent::__construct();
     $this->createLog();
     $this->insertRequests();
     //return log_id as response, caller may use it to something ...
     echo $this->log_id;
 }
开发者ID:davidkonrad,项目名称:allearter,代码行数:8,代码来源:ajax_log.php

示例10: __construct

 public function __construct()
 {
     parent::__construct();
     if (isset($_GET['artsgruppe']) || isset($_GET['artsgruppedk'])) {
         //$this->artsgruppe=$this->getArtsgruppe();
         $this->artsgruppe = isset($_GET['artsgruppe']) ? $_GET['artsgruppe'] : $_GET['artsgruppedk'];
     }
 }
开发者ID:davidkonrad,项目名称:allearter,代码行数:8,代码来源:meta.php

示例11: __construct

 public function __construct($name, $email, $password)
 {
     parent::__construct();
     $this->name = $name;
     $this->password = $password;
     $this->email = $email;
     $this->id = 0;
 }
开发者ID:bogwien,项目名称:first.mystore.loc,代码行数:8,代码来源:User.php

示例12: __construct

 public function __construct()
 {
     parent::__construct();
     $taxon = isset($_GET['taxon']) ? $_GET['taxon'] : '';
     if ($taxon != '') {
         $this->getCOF_URL($taxon);
     }
 }
开发者ID:davidkonrad,项目名称:allearter,代码行数:8,代码来源:cof.php

示例13: __construct

 public function __construct()
 {
     parent::__construct();
     $get = isset($_GET['get']) ? $_GET['get'] : 'Rige';
     $parent = isset($_GET['parent']) ? $_GET['parent'] : '';
     $base = isset($_GET['base']) ? $_GET['base'] : '';
     $this->load($get, $parent, $base);
 }
开发者ID:davidkonrad,项目名称:allearter,代码行数:8,代码来源:hierarchy.php

示例14: __construct

 public function __construct()
 {
     parent::__construct();
     mysql_set_charset('utf8');
     if (!$this->getExclusive()) {
         $this->getRandom();
     }
     $this->getTeasers();
 }
开发者ID:davidkonrad,项目名称:allearter,代码行数:9,代码来源:promo.php

示例15: __construct

    public function __construct($char)
    {
        parent::__construct();
        $this->style();
        if (!isset($_GET['arter'])) {
            $this->arter = 'da';
            $this->ca = array('a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'x', 'y', 'z', 'Æ', 'Ø', 'Å');
        } else {
            switch ($_GET['arter']) {
                case 'int':
                    $this->arter = 'int';
                    $this->ca = array('a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'x', 'y', 'z');
                    break;
                default:
                    $this->arter = 'da';
                    $this->ca = array('a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'x', 'y', 'z', 'Æ', 'Ø', 'Å');
                    break;
            }
        }
        echo '<div style="padding-left:20px;">';
        ?>
			<a href="/" id="show-search-simple" style="text-decoration:none;">&#171;&nbsp;Simpel søgning</a>
			&nbsp;>&nbsp;
			<a href="http://allearter.dk/" style="text-decoration:none;">Projekt Allearter Startside</a>
			<br><br>
			<h1>Artsregister - alle arter A - Å</h1>
			<br>
<?php 
        $this->arterMenu();
        $this->char = in_array($char, $this->ca) ? $char : 'a';
        if ($this->arter == 'da') {
            $SQL = 'select Videnskabeligt_navn, Dansk_navn from allearter where Dansk_navn like "' . $this->char . '%" order by Dansk_navn asc';
        } else {
            $SQL = 'select Videnskabeligt_navn, Dansk_navn from allearter where Dansk_navn="" and Videnskabeligt_navn like "' . $this->char . '%" order by Videnskabeligt_navn asc';
        }
        $header = '<h1 class="taksonomi">' . ucfirst($this->char) . '</h1>';
        //echo $SQL;
        mysql_set_charset('utf8');
        $result = $this->query($SQL);
        echo '<div class="header-cnt">';
        echo $header;
        $this->leftMenu();
        echo '</div>';
        echo '<div class="sitemap-cnt"><br/>';
        while ($row = mysql_fetch_array($result)) {
            $taxon = str_replace(' ', '+', $row['Videnskabeligt_navn']);
            if ($this->arter == 'da') {
                echo '<a class="taksonomi" href="?taxon=' . $taxon . '"><strong>' . $row['Dansk_navn'] . '</strong>&nbsp;&nbsp;<i style="font-family:times,serif;color:black;">' . $row['Videnskabeligt_navn'] . '</i></a><br>';
            } else {
                echo '<a class="taksonomi" href="?taxon=' . $taxon . '"><i style="font-size:1.1em;">' . $row['Videnskabeligt_navn'] . '</i></a><br>';
            }
        }
        echo '<br/></div>';
        //01032015
        echo '</div>';
    }
开发者ID:davidkonrad,项目名称:allearter,代码行数:56,代码来源:sitemap.php


注:本文中的Db::__construct方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。