Hi All,
I have $this->debug which I append ... debug is a property in pass class. Utility is another class I am injecting.
It works fine at the top 2 levels. I can use utility in the third level but can't append the debug property. IE this only works top 2 levels.
$this->debug .= 'new comment </ br>';
In Main (top level) I declare
function __construct(){
$this->pass = new Pass();
$this->util = new Utility($this->pass);
$this->consignments_pages = new ConsignmentsPages($this->util, $this->pass);
Then in ConsignmentsPages next level
function __construct($util, $pass){
$this->pass = $pass;
$this->util = $util;
$this->consignments_actions = new ConsignmentsActions($this->util, $this->pass);
In this level I can append as follows and it works great.
$this->debug .= 'new comment </ br>';
Then in ConsignmentsActionsnext level
ConsignmentsActions($this->util, $this->pass)
$this->pass = $pass;
$this->util = $util;
I can used the utility functions.
But when I append to $this->debug .= 'new comment </ br>';
It doesn't append, when it's outputted at the top level.
Advice please 🙂 (nb I am fairly new to OO)
Thank you!