作者:zwjy2018 | 来源:互联网 | 2023-05-16 17:22
ihaveigniteddatatablesLibraryinmycodeigniterlibraryfolder.我已经在我的codeigniter库文件夹中点燃了datatab
i have ignited datatables Library in my codeigniter library folder.
我已经在我的codeigniter库文件夹中点燃了datatables Library。
Some Code from Library
图书馆的一些代码
class Datatables
{
/**
* Global container variables for chained argument results
*
*/
protected $ci;
protected $table;
protected $distinct;
protected $group_by;
protected $select = array();
protected $joins = array();
protected $columns = array();
protected $where = array();
protected $filter = array();
protected $add_columns = array();
protected $edit_columns = array();
protected $unset_columns = array();
/**
* Copies an instance of CI
*/
public function __construct()
{
$this->ci =& get_instance();
}
i then called the library in model
然后我在模型中调用了库
class Common_Model extends MY_Model{
function __construct(){
parent::__construct();
$this->load->library('Datatables.php');
}
then i tried to call the library functions
然后我试图调用库函数
function select_fields_joined_DT($data, $PTable, $joins = '', $where = '', $addColumn = '',$unsetColumn='')
{
/**
*
*/
$this->datatables->select($data);
if ($unsetColumn != '') {
unset_column($unsetColumn);
}
$this->datatables->from($PTable);
if ($joins != '') {
foreach ($joins as $k => $v) {
//$this->datatables->join($v['table'], $v['condition'], $v['type']);
}
}
if ($addColumn != '') {
$this->datatables->add_column("Actions", $addColumn);
}
$result = $this->datatables->generate();
return $result;
}
and everything works fine, except that the phpstorm show me error
一切正常,除了phpstorm告诉我错误
Field Accessed via magic method
i tried to remove this error with document comments but cant figure out how can i do that.. any help will be appreciated.
我试图用文档注释删除此错误,但无法弄清楚我该怎么做..任何帮助将不胜感激。
2 个解决方案