CodeIgniter Forums
Hello eh found this rare variable "config(App::class)" could tell me about this - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: CodeIgniter 4 (https://forum.codeigniter.com/forumdisplay.php?fid=28)
+--- Forum: CodeIgniter 4 Support (https://forum.codeigniter.com/forumdisplay.php?fid=30)
+--- Thread: Hello eh found this rare variable "config(App::class)" could tell me about this (/showthread.php?tid=78801)



Hello eh found this rare variable "config(App::class)" could tell me about this - yuma2020 - 03-12-2021

I apologize for questions, it's just that I find it interesting, As you will see I have seen in the configuration of a library of codeigniter and it has caught my attention the same and I remain in the doubt that it applies specifically.

PHP Code:
    public function __construct() {
        $config config(App::class);
        $this->response = new Response($config);
    
I have some doubts so that it will really be and/or how it could have an impact in the course of use, if necessary and as a help to the environment, I would also appreciate it if there is any source documentation or code to check more about these things.


RE: Hello eh found this rare variable "config(App::class)" could tell me about this - InsiteFX - 03-12-2021

This should explain it to you.

Class name resolution via ::class