Files
FHC-Core/application/core/DB_Model.php
T
paolo 4cc83999ed - Moved class APIv1_Controller from FHC_Controller.php to APIv1_Controller.php
- Moved class DB_Model from FHC_Model.php to DB_Model.php
- load method of class person (person.class.php) now is calling getPerson
  method of the class Person_model
- getAllForBewerbung method of class studiengang (studiengang.class.php) now is calling getAllForBewerbung
  method of the class Studiengang_model
- getStudienplaene method of class studienplan (studienplan.class.php) now is calling getStudienplaene
  method of the class Studienplan_model
2016-04-25 18:25:03 +02:00

64 lines
1.0 KiB
PHP

<?php
class DB_Model extends FHC_Model
{
protected $dbTable = NULL; // Name of the DB-Table for CI-Insert, -Update, ...
// Addon ID, stored to let to check the permissions
private $_addonID;
function __construct()
{
parent::__construct();
$this->load->database();
$this->lang->load('fhc_db');
}
public function insert($data)
{
if(!is_null($this->dbTable))
{
$this->db->insert($this->dbTable, $data);
return TRUE;
}
else
{
return FALSE;
}
}
/** ---------------------------------------------------------------
* Invalid ID
*
* @param integer config.php error code numbers
* @return array
*/
protected function _invalid_id($error = '')
{
return array(
'err' => 1,
'code' => $error,
'msg' => lang('fhc_' . $error)
);
}
/**
* Method setAddonID
*
* @param $addonID
* @return void
*/
public function setAddonID($addonID)
{
$this->_addonID = $addonID;
}
/**
* Method getAddonID
*
* @return string _addonID
*/
public function getAddonID()
{
return $this->_addonID;
}
}