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


PHP MY_Model类代码示例

本文整理汇总了PHP中MY_Model的典型用法代码示例。如果您正苦于以下问题:PHP MY_Model类的具体用法?PHP MY_Model怎么用?PHP MY_Model使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


在下文中一共展示了MY_Model类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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: 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

示例4:

 function __construct()
 {
     parent::__construct();
     $this->table_nom = 'utilisateurs';
     $this->cle_primaire = 'ID';
     $this->table_order = '';
 }
开发者ID:ProfGoupyl,项目名称:webdev2016,代码行数:7,代码来源:UtilisateursModel.php

示例5: 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

示例6: 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

示例7:

 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

示例8: 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

示例9: 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

示例10: __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

示例11: 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

示例12: 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

示例13: __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

示例14: __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

示例15: 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


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