Hooks::model PHP Method

model() protected method

获取插件目录下的Model模型文件
protected model ( string $name, string $class = 'Model' ) : object
$name string Model名称
$class string 类名后缀,默认为Model
return object 返回一个模型对象
    protected function model($name, $class = 'Model')
    {
        $className = ucfirst($name) . $class;
        tsload($this->path . DIRECTORY_SEPARATOR . $className . '.class.php');
        return new $className();
    }