本文整理汇总了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();
}
示例2: __construct
public function __construct()
{
$this->db_config = loadConfig('dbconfig');
$this->db_setting = 'default';
$this->table_name = 'session';
parent::__construct();
}
示例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();
}
示例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'];
}
示例5: __construct
public function __construct($db_config)
{
$this->db_config = array('ucenter' => $db_config);
$this->db_setting = 'ucenter';
$this->table_name = 'members';
parent::__construct();
}
示例6:
function __construct()
{
$this->db_config = pc_base::load_config('database');
$this->db_setting = 'default';
$this->table_name = 'dianping_type';
parent::__construct();
}
示例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();
}
示例8: __construct
/**
* The construct function.
*
* @access public
* @return void
*/
public function __construct()
{
parent::__construct();
$this->setAgent();
$this->setApiRoot();
$this->loadModel('tree');
}
示例9: __construct
public function __construct()
{
$this->db_config = pc_base::load_config('database');
$this->db_setting = 'comment';
$this->table_name = 'comment_setting';
parent::__construct();
}
示例10: __construct
public function __construct()
{
parent::__construct();
$this->db = $this->load->db->Mysqli();
//$this->ramdom=new Ramdom();
$this->dataMSG = new ArrayObject();
}
示例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;
}
}
}
}
示例12: __construct
/**
* Construct function.
*
* @access public
* @return void
*/
public function __construct()
{
parent::__construct();
$this->now = time();
$this->setSavePath();
$this->setWebPath();
}
示例13: __construct
/**
* The construct function.
*
* @access public
* @return void
*/
public function __construct()
{
parent::__construct();
$this->setAgent();
$this->setApiRoot();
$this->classFile = $this->app->loadClass('zfile');
}
示例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';
}
示例15: __construct
public function __construct()
{
//调用其他数据库配置文件,操作其他数据库
$this->db_config = System::load_sys_config('database');
$this->db_setting = 'two';
parent::__construct();
}