Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

3
  • 2
    You would have to pass the MyClass object to SomeClass by sending $this in the constructor or setting it after the object is created. You then would need to store MyClass as a property if you intend to use any where else in SomeClass after it is instantiated. Commented Nov 6, 2016 at 14:47
  • edit complete, i hope its clearer now. Commented Nov 6, 2016 at 14:47
  • @sebastianForsberg thats what I had in mind but I thought there might be a different way. Commented Nov 6, 2016 at 14:48