當前位置: 首頁>>代碼示例>>PHP>>正文


PHP model::__construct方法代碼示例

本文整理匯總了PHP中model::__construct方法的典型用法代碼示例。如果您正苦於以下問題:PHP model::__construct方法的具體用法?PHP model::__construct怎麽用?PHP model::__construct使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在model的用法示例。


在下文中一共展示了model::__construct方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1:

	function __construct() {
		$this->db_config = pc_base::load_config('database');
		$this->db_setting = 'default';
		$this->table_name = 'product_pic';
        $this->product_cat = pc_base::load_model('product_cat_model');
		parent::__construct();
	}
開發者ID:panhongsheng,項目名稱:zl_cms,代碼行數:7,代碼來源:product_pic_model.class.php

示例2: __construct

 public function __construct()
 {
     $this->db_config = loadConfig('dbconfig');
     $this->db_setting = 'default';
     $this->table_name = 'session';
     parent::__construct();
 }
開發者ID:iquanxin,項目名稱:march,代碼行數:7,代碼來源:session_model.cls.php

示例3: __construct

	public function __construct() {
		$this->db_config = pc_base::load_config('database');
		$this->db_setting = 'default';
		parent::__construct();
		$this->url = pc_base::load_app_class('url', 'content');
		$this->siteid = get_siteid();
	}
開發者ID:panhongsheng,項目名稱:zl_cms,代碼行數:7,代碼來源:content_model.class.php

示例4: __construct

 public function __construct()
 {
     parent::__construct();
     $setting = $this->db->table('payment_authorize')->get();
     $this->api_id = $setting['api_id'];
     $this->api_key = $setting['api_key'];
 }
開發者ID:Jeremysoft,項目名稱:mallmold,代碼行數:7,代碼來源:authorize_cim.php

示例5: __construct

 public function __construct($db_config)
 {
     $this->db_config = array('ucenter' => $db_config);
     $this->db_setting = 'ucenter';
     $this->table_name = 'members';
     parent::__construct();
 }
開發者ID:ahmatjan,項目名稱:huluphp,代碼行數:7,代碼來源:uc_model.class.php

示例6:

 function __construct()
 {
     $this->db_config = pc_base::load_config('database');
     $this->db_setting = 'default';
     $this->table_name = 'dianping_type';
     parent::__construct();
 }
開發者ID:klj123wan,項目名稱:czsz,代碼行數:7,代碼來源:dianping_type_model.class.php

示例7:

	function __construct() {
		$this->db_config = pc_base::load_config('database');
		$this->db_setting = 'default';
		//$this->db_tablepre = $this->db_config[$this->db_setting]['tablepre'];
		$this->table_name = 'vote_option';
		parent::__construct();
	}
開發者ID:panhongsheng,項目名稱:zl_cms,代碼行數:7,代碼來源:vote_option_model.class.php

示例8: __construct

 /**
  * The construct function.
  * 
  * @access public
  * @return void
  */
 public function __construct()
 {
     parent::__construct();
     $this->setAgent();
     $this->setApiRoot();
     $this->loadModel('tree');
 }
開發者ID:laiello,項目名稱:zentaoms,代碼行數:13,代碼來源:model.php

示例9: __construct

 public function __construct()
 {
     $this->db_config = pc_base::load_config('database');
     $this->db_setting = 'comment';
     $this->table_name = 'comment_setting';
     parent::__construct();
 }
開發者ID:ahmatjan,項目名稱:huluphp,代碼行數:7,代碼來源:comment_setting_model.class.php

示例10: __construct

 public function __construct()
 {
     parent::__construct();
     $this->db = $this->load->db->Mysqli();
     //$this->ramdom=new Ramdom();
     $this->dataMSG = new ArrayObject();
 }
開發者ID:WHTGo,項目名稱:EXP-Training,代碼行數:7,代碼來源:Processes.php

示例11: __construct

 public function __construct($par = null)
 {
     if (is_null($par)) {
         $this->mysql = db::getInstance();
         if (!empty($_POST['test']) && !empty($_POST['check'])) {
             $test_id = (int) $_POST['test'];
             $sum = 0;
             foreach ($_POST['check'] as $ch) {
                 $r = $this->mysql->executeQuery("SELECT `id_set` FROM `set_to_test` WHERE `id_set`=:set_id AND `id_test`=:test_id", array(array(':test_id', $test_id, 'integer'), array(':set_id', (int) $ch, 'integer')));
                 $sum += $r['rows'];
             }
             if ($sum < 1) {
                 foreach ($_POST['check'] as $ch) {
                     $this->mysql->executeQuery("INSERT INTO `set_to_test` (`id_test`, `id_set`) VALUES (:test_id, :set_id)", array(array(':test_id', $test_id, 'integer'), array(':set_id', (int) $ch, 'integer')));
                 }
                 $this->data['alert'] = array('type' => 'success', 'mess' => array('addtotest'));
             } else {
                 $this->data['alert'] = array('type' => 'warning', 'mess' => array('testanyet'));
             }
         }
         parent::__construct('adm_menu_set');
         $r = $this->mysql->executeQuery("SELECT `id_set`, `s_name` FROM `set`");
         while ($row = $r['stmt']->fetch(PDO::FETCH_ASSOC)) {
             $this->data['set'][] = $row;
         }
         $r = $this->mysql->executeQuery("SELECT `id_test`, `t_test_name` FROM `test`");
         if ($r['rows'] >= 1) {
             while ($row = $r['stmt']->fetch(PDO::FETCH_ASSOC)) {
                 $this->data['test'][] = $row;
             }
         }
     }
 }
開發者ID:allok,項目名稱:PhpTS,代碼行數:33,代碼來源:m_admin_set.php

示例12: __construct

 /**
  * Construct function.
  * 
  * @access public
  * @return void
  */
 public function __construct()
 {
     parent::__construct();
     $this->now = time();
     $this->setSavePath();
     $this->setWebPath();
 }
開發者ID:jsyinwenjun,項目名稱:zentao,代碼行數:13,代碼來源:model.php

示例13: __construct

 /**
  * The construct function.
  * 
  * @access public
  * @return void
  */
 public function __construct()
 {
     parent::__construct();
     $this->setAgent();
     $this->setApiRoot();
     $this->classFile = $this->app->loadClass('zfile');
 }
開發者ID:iamazhi,項目名稱:zentaopms,代碼行數:13,代碼來源:model.php

示例14: __construct

 public function __construct()
 {
     $this->db_config = pc_base::load_config('database');
     $this->db_setting = 'default';
     parent::__construct();
     $this->table_name = $this->db_tablepre . 'index_mapping';
 }
開發者ID:lestatmq,項目名稱:cms,代碼行數:7,代碼來源:index_mapping_model.class.php

示例15: __construct

 public function __construct()
 {
     //調用其他數據庫配置文件,操作其他數據庫
     $this->db_config = System::load_sys_config('database');
     $this->db_setting = 'two';
     parent::__construct();
 }
開發者ID:ping199143,項目名稱:1ydb,代碼行數:7,代碼來源:admin_model.model.php


注:本文中的model::__construct方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。