0
通常,當你在Opencart的加載模式,你會做到以下幾點:如何在opencart中的模型類構造方法中傳遞參數?
$this->load->model('example');
// calling the method inside the model
$this->model_example->method();
然而,現在我有,有一個構造函數,這樣的模式:
public function __construct($filepath, $timezone, $priority, $registry){
// code...
}
正如你所看到的,我需要使用構造函數中所需的所有參數加載模型,那麼在這種情況下如何加載我的模型?
模型函數是這個笨? – Demonyowh
@Demonyowh不,它是opencart,但它們的語法非常相似 – SSD