Jump to content

jxwd

New Members
  • Posts

    3
  • Joined

  • Last visited

jxwd's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Yes thought so but couldn't see a difference, as was declaring everything the same... But now I can it's how I am calling the methods. So problem solved. How to bring states of the code for debugging and how to use regularly used pieces of code as I have done with a utility class. Thanks
  2. Ahhh yes sorry exactly that: $this->pass->debug .= 'comment <br />'; It is used in methods in all three classes to show states as the code runs. For example function evaluate_page () { $this->pass->debug .= $this->util->clock().'START(method) evaluate_page.page_name.'.$this->util->read_session('btn_nav').'<br />'; I am using this property in all three Classes to see states of the code in history... It works at the top two classes. Utility is another class I am using for database functions, session variables and other commonly reused things like drop menus. Very open to doing it another way 🙂 Thank you
  3. 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!
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.