当前位置: 首页>>代码示例>>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;未经允许,请勿转载。