Closed adolfoamaris closed 6 years ago
$this
is a reference to the Plates Template i believe, and not the CI super global. you'll need to do something like get_instance()->session
or pass in the CI object as a global to the Plates Engine.
CI_Controller is the superglobal used in CI to get instances if session etc. In extension to @ragboyjr's answer
@adolfoamaris can we close this?
Hello, I implemented plates in codeigniter 3 and I have a conflict when trying to
echo $ this-> session-> userdata ("username");
with the following message:How could I solve it?
A PHP Error was encountered
Severity: Notice
Message: Undefined property: League\Plates\Template\Template::$session
Filename: views/main.php
Line Number: 202
Thank you