When I instantiate a class I pass it an array called $content. I call a method in the class that returns a value. I want to update the $content array in my logic module that originally called the class and then call another method in the class. If I do, the $content array is not updated in the class the second time I call a method.
I know that I can update it in the class before I return the value but is there a way to pass the initial $content variable by reference so that when it is updated by my logic module it is also updated for the class? Or is that just bad practice to let those variables “share” activity? Thanks