medoo类库使用其方法后导致类中使用构造函数后报错
部分代码:
\app\model\cModel.php下:
class cModel extends model
{
public $table;
public function __construct($table1)
{
$this->table = $table1;
}
public function lists()
{
$ret = $this->select($this->table,'*');
return $ret;
}
\app\ctrl\indexCtrl.php下:
<?php
namespace app\ctrl;
use core\lib\model;
class indexCtrl extends \core\future
{
public function index(){
$table1 = 'users';
$model = new \app\model\cModel($table1);
$ret = $model->delOne(1);
dump($ret);
$ret1 = $model->lists();
dump($ret1);
}
}
值可以传过去,但是报medoo的错误,Undefined property: app\model\cModel::$pdo