I am currently coding along with "PHP Shopping Cart with OOP & MVC" project on StudioWeb and I have a question on how includes work and I hope that anyone can help me.
Basically I want to know how one page can magically have access to a specific class. In the video "Template Object: Part 2", timestamp 8:49, in the "v_public_home.php" file, Ben wrote "$this" because the view is being included in the Template object.
I cannot wrap my head around how this works. It just seems to me that out of nowhere we can access the Template object. Can anyone give me a d