Question: What is the problem that I apparently cannot pass an object through to this method?
Code: http://ift.tt/1D3NGTq
Issue: Line 22 $this->business->add($specrep); returns Call to a member function add() on a non-object when indeed there is an object in there albeit not a correct object but still an object.
Goal: To successfully have 2 or more classes talking back and forth between each other and to understand how to accomplish this myself.
Notes:
- The code is just for me to learn from. It is not anything serious. I created it because I am watching a tutorial about messaging 101 on http://ift.tt/1wAhi6D
- I know that line 22 on the code is not correct. I made it that way trying to ensure that I indeed did have an object in that request. I left it that way so you could see that an object is passed through to the call. I can make his stuff work however obviously don't understand this well enough to make my own work.
- I am aware that the add function on line 32-34 is commented out. The error in question is there whether this is commented out or not.
- When I var_dump $specrep on line 40 it definitely returns an object so I should be passing an object through when calling the method.
Aucun commentaire:
Enregistrer un commentaire