在不扩展AppController的控制器中使用Helper

i have created a controller that extends TCPDF to be able to customise a bunch of stuffs , also i need to use inside it Helpers . knowing that i can not have multiple inheritance in php , i tried to create an instance of the view inside the constructor of my new controller to grab the target Helper

like this

class NewPDF extends TCPDF{

    public function __construct()
    {
     $fakeView=new View($this);
     $htmlHelper=$fakeView->loadHelper("Html");
     # some code ..... parent::__construct()
    }

}

it does not work . it gave me weird errors !!!

how can i use a helper inside a controller that does not extend AppController ?

it does not work . it gave me weird errors !!!

It does because you're doing everything totally wrong. That you want to extend a controller with a helper and even throw a view in the mix tells me you have seriously no idea at all how a MVC framework works.

At least I'm not going to write in detail what is wrong because like I said, everything is wrong, start with the very basics. The links will explain how to do it right. What you wrote shows a huge lack of knowledge that can't be fixed by a short answer.