I’ve been investigating the Lithium PHP Framework and I don’t understand how it sets $this->context; (particularly in this layout.)
Since you cannot simply re-assign $this obviously this layout will get included at some point and what confuses me even more is the fact that they use $this outside a class definition.
I haven’t coded PHP in a while so please help me out here.
The first idea that strikes me is that this templating page is called from a method.
From this point, the included
$templatecan access any method of Viewer’s class