×

Welcome to TagMyCode

Please login or create account to add a snippet.
0
0
 
0
Language: PHP
Posted by: Dylan Lopez
Added: Nov 20, 2017 5:52 AM
Modified: Mar 29, 2018 10:09 AM
Views: 2623
Tags: bonfire model new
  1. <?php
  2. defined('BASEPATH') || exit('No direct script access allowed');
  3.  
  4. class X_model extends BF_Model
  5. { //https://www.cibonfire.com/docs/developer/bonfire_models#skeleton
  6.     protected $table_name   = '';
  7.     protected $key          = 'id';
  8.     protected $soft_deletes = FALSE;
  9.     protected $date_format  = 'int';
  10.     protected $log_user     = FALSE;
  11.  
  12.     protected $set_created  = TRUE;
  13.     protected $created_field    = 'created_on';
  14.     protected $created_by_field = 'created_by';
  15.  
  16.     protected $set_modified     = FALSE;
  17.     protected $modified_field   = 'modified_on';
  18.     protected $modified_by_field = 'modified_by';
  19.  
  20.     protected $deleted_field    = 'deleted';
  21.     protected $deleted_by_field = 'deleted_by';
  22.  
  23.     // Observers
  24.     protected $before_insert    = array();
  25.     protected $after_insert     = array();
  26.     protected $before_update    = array();
  27.     protected $after_update     = array();
  28.     protected $before_find      = array();
  29.     protected $after_find       = array();
  30.     protected $before_delete    = array();
  31.     protected $after_delete     = array();
  32.  
  33.     protected $return_insert_id = true;
  34.     protected $return_type      = 'object';
  35.     protected $protected_attributes = array();
  36.     protected $field_info           = array();
  37.  
  38.     protected $validation_rules         = array();
  39.     protected $insert_validation_rules  = array();
  40.     protected $skip_validation          = false;
  41.     protected $empty_validation_rules   = array();
  42.    
  43.     public function __construct()
  44.     {
  45.         parent::__construct();
  46.     }
  47. }
  48.