本文整理汇总了PHP中MY_Model类的典型用法代码示例。如果您正苦于以下问题:PHP MY_Model类的具体用法?PHP MY_Model怎么用?PHP MY_Model使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了MY_Model类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: Model
/**
* @param string $model
*
* @return mixed
*/
function Model($model = 'codefight', $config = FALSE)
{
if (!is_object('MY_Model')) {
include_once APPPATH . DS . 'core' . DS . 'MY_Model.php';
}
//$CI =& get_instance();
$MY_Model = new MY_Model();
//$CI->model('MY_Model');
return $MY_Model->Model($model, $config);
//return $MY_Model->Model($model);
}
开发者ID:mashbro,项目名称:Codefight-CMS,代码行数:16,代码来源:general_helper.php
示例2: __construct
public function __construct()
{
parent::MY_Model();
$this->primary_key = "id";
$this->table_name = "solicitacao";
$this->order_by = "id";
}
开发者ID:4bner,项目名称:bsbios,代码行数:7,代码来源:SolicitacaoModel.php
示例3: __construct
public function __construct()
{
parent::MY_Model();
$this->tabla['nombre'] = 'campos';
$this->tabla['campoclave'] = 'idcampo';
$this->tabla['campos'] = array('idcampo', 'nombre');
}
开发者ID:kailIII,项目名称:jamboree,代码行数:7,代码来源:campo.php
示例4: __construct
public function __construct()
{
parent::MY_Model();
$this->tabla['nombre'] = 'seisenas';
$this->tabla['campoclave'] = 'idseisena';
$this->tabla['campos'] = array('idseisena', 'idmanada', 'idcampo', 'provincia', 'elementos');
}
开发者ID:kailIII,项目名称:jamboree,代码行数:7,代码来源:seisena.php
示例5: rdf
/**
* Return an RDF object based an a $row
*/
public function rdf($row, $prefix = '')
{
$row->type = isset($row->type) ? $row->type : 'version';
if (isset($row->url)) {
if (!is_array($row->url)) {
$row->url = array($row->url);
}
foreach ($row->url as $key => $value) {
if (!isURL($value)) {
$row->url[$key] = abs_url($value, $prefix);
}
}
}
$rdf = parent::rdf($row, $prefix);
// Blend with RDF from the semantic store
if (!empty($row->rdf)) {
foreach ($row->rdf as $p => $values) {
if (array_key_exists($p, $rdf)) {
// TODO: Not sure we should allow a collision between the semantic and relational tables? For now, don't.
} else {
$rdf[$p] = $values;
}
}
}
return $rdf;
}
开发者ID:austinvernsonger,项目名称:scalar,代码行数:29,代码来源:version_model.php
示例6:
function __construct()
{
parent::__construct();
$this->table_nom = 'utilisateurs';
$this->cle_primaire = 'ID';
$this->table_order = '';
}
开发者ID:ProfGoupyl,项目名称:webdev2016,代码行数:7,代码来源:UtilisateursModel.php
示例7: load
function load($value, $by = 'id', $except_value = '', $except_by = 'id')
{
$row = parent::load($value, $by, $except_value, $except_by);
$eRol = new eRol();
$eRol->parseRow($row);
return $eRol;
}
开发者ID:crodriguezn,项目名称:crossfit-milagro,代码行数:7,代码来源:profile_permission_model.php
示例8: lang
function __construct()
{
parent::__construct();
$this->timestamps = FALSE;
// rules
$this->rules = ['insert' => ['name' => ['field' => 'name', 'label' => lang('menu.form.name'), 'rules' => 'required|trim|xss_clean'], 'active' => ['field' => 'active', 'label' => lang('menu.form.active'), 'rules' => 'trim|xss_clean'], 'position' => ['field' => 'position', 'label' => lang('menu.form.position'), 'rules' => 'trim|xss_clean']], 'update' => ['name' => ['field' => 'name', 'label' => lang('menu.form.name'), 'rules' => 'required|trim|xss_clean'], 'active' => ['field' => 'active', 'label' => lang('menu.form.active'), 'rules' => 'trim|xss_clean'], 'position' => ['field' => 'position', 'label' => lang('menu.form.position'), 'rules' => 'trim|xss_clean']]];
}
开发者ID:nugato,项目名称:nuCMS,代码行数:7,代码来源:Menu_model.php
示例9:
function __construct()
{
include BLOG_PATH . 'config/blog.php';
$tables = $config['tables'];
parent::__construct($tables['blog_settings']);
// table name
}
开发者ID:hawkeye64,项目名称:FUEL-CMS-Blog-Module,代码行数:7,代码来源:blog_settings_model.php
示例10: validate
public function validate()
{
$this->form_validation->set_rules('email_template_title', $this->lang->line('email_template_title'), 'required');
$this->form_validation->set_rules('email_template_body', $this->lang->line('email_body'));
$this->form_validation->set_rules('email_template_footer', $this->lang->line('email_footer'));
return parent::validate();
}
开发者ID:najahnasir,项目名称:MyClientBase,代码行数:7,代码来源:mdl_email_templates.php
示例11: load
function load($value, $by = 'id', $except_value = '', $except_by = 'id')
{
$row = parent::load($value, $by, $except_value, $except_by);
$ePermission = new ePermission();
$ePermission->parseRow($row);
return $ePermission;
}
开发者ID:crodriguezn,项目名称:crossfit-milagro,代码行数:7,代码来源:permission_model.php
示例12: __construct
public function __construct()
{
$this->table = 'user_details';
$this->primary_key = 'user_id';
$this->has_one['user'] = 'User_model';
parent::__construct();
}
开发者ID:paramjot-sarao,项目名称:Narration-web,代码行数:7,代码来源:User_details_model.php
示例13: check_name
/**
* Check name
*
* @access public
* @param string $name
* @param id $id
* @return bool
*/
public function check_name($name = '', $id = 0)
{
return (int) parent::count_by(array(
'id !=' => $id,
'name' => $name
)) > 0;
}
开发者ID:reith2004,项目名称:pyrocms,代码行数:15,代码来源:variables_m.php
示例14: load
function load($value, $by = 'id', $except_value = '', $except_by = 'id')
{
$row = parent::load($value, $by, $except_value, $except_by);
$ePais = new ePais();
$ePais->parseRow($row);
return $ePais;
}
开发者ID:crodriguezn,项目名称:crossfit-milagro,代码行数:7,代码来源:pais_model.php
示例15: __construct
public function __construct()
{
parent::__construct();
$this->banco = $this->config->item('dbFabricaPinheiro');
$this->tabela = $this->config->item('tblBlogsCategorias');
$this->apelido = 'blc';
}
开发者ID:BGCX067,项目名称:fabrica-pinheiro-svn-to-git,代码行数:7,代码来源:blogs_categorias_model.php
示例16: __construct
/**
* Constructor
*
* @access public
* @return void
*/
public function __construct()
{
$CI =& get_instance();
$CI->config->module_load(FUEL_FOLDER, 'fuel', TRUE);
$tables = $CI->config->item('tables', 'fuel');
parent::__construct($tables['fuel_archives']);
}
开发者ID:magicjoey,项目名称:FUEL-CMS,代码行数:13,代码来源:fuel_archives_model.php
示例17: callback_after_get
protected function callback_after_get($result)
{
$this->load->model('Blog_tag_model', 'tags');
$result = parent::callback_after_get($result);
$result->tags = $this->tags->get_by_post_id($result->id);
return $result;
}
开发者ID:NaszvadiG,项目名称:codeigniter_boilerplate,代码行数:7,代码来源:Blog_post_model.php
示例18: get
public function get($id_or_fields = null, $first_only = false, $order_by = null, $select_fields = array())
{
$tasks = parent::get($id_or_fields, $first_only, $order_by, $select_fields);
if ($first_only || !is_array($tasks)) {
$tasks = array($tasks);
}
if (!empty($tasks)) {
foreach ($tasks as $key => $task) {
if (empty($task)) {
continue;
}
$diagnostic_issue = $this->diagnostic_issue_model->get_from_cache($task->diagnostic_issue_id);
$tasks[$key]->name = $this->step_model->get_name($task->step_id) . ': ' . $this->part_type_model->get_name($diagnostic_issue->part_type_id);
$step_past = $this->step_model->get_past_tense($task->step_id);
$issue = $this->issue_type_model->get_name($diagnostic_issue->issue_type_id);
if (strstr($step_past, '[[part]]')) {
$step_past = str_replace('[[part]]', $this->part_type_model->get_name($diagnostic_issue->part_type_id), $step_past);
$tasks[$key]->past_name = $step_past;
} else {
$tasks[$key]->past_name = $step_past . ' ' . $this->part_type_model->get_name($diagnostic_issue->part_type_id);
}
$tasks[$key]->past_name = strtolower($tasks[$key]->past_name);
$tasks[$key]->issue_description = $issue . ' ' . $this->part_type_model->get_name($diagnostic_issue->part_type_id);
}
}
if ($first_only || !is_array($id_or_fields)) {
return reset($tasks);
}
return $tasks;
}
开发者ID:nicolasconnault,项目名称:streamliner,代码行数:30,代码来源:Repair_task_model.php
示例19: __construct
public function __construct()
{
parent::__construct();
$this->table_name = 'carriers';
$this->nameCol = 'network';
$this->set_dropdown_arrays();
}
开发者ID:WillieBHines,项目名称:ci-practices,代码行数:7,代码来源:Carrier.php
示例20: get_by
/**
* Override parent
*/
public function get_by($where, $joins = array())
{
$this->set_table_alias('u');
$this->db->select('u.id, u.email, u.password, u.first_name, u.last_name, u.active, ug.name AS group');
$joins[] = array('user_groups AS ug', 'u.group_id = ug.id');
return parent::get_by($where, $joins);
}
开发者ID:sraju1397,项目名称:ci_bootstrap_3,代码行数:10,代码来源:User_model.php
注:本文中的MY_Model类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论