1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47
|
<?php
/**
* Kalkun
* An open source web based SMS Management
*
* @package Kalkun
* @author Kalkun Dev Team
* @license https://spdx.org/licenses/GPL-2.0-or-later.html
* @link https://kalkun.sourceforge.io/
*/
// ------------------------------------------------------------------------
/**
* Message_model Class
*
* The real function should be handled by it's gateway engine
*
* @package Kalkun
* @subpackage Messages
* @category Models
*/
class Message_model extends CI_Model {
private $gateway = '';
/**
* Constructor
*
* @access public
*/
function __construct()
{
parent::__construct();
$gateway_config = $this->config->item('gateway');
$gateway_class = $gateway_config['engine'].'_model';
//require_once('gateway/'.$gateway_config['engine'].'_model.php');
$this->load->model('gateway/'.$gateway_class, 'gate');
$this->gateway = $this->gate;
}
public function __call($name, $arguments)
{
$res = call_user_func_array(array($this->gateway, $name), $arguments);
return $res;
}
}
|