Brad Padgett
Well-known member
I'm having issues with the following.
- I can't figure out how to carry over all my work in one class to the next.
- I can't find a way to create a new instance of an object in a separate class file
What I want to do is call functions from one class to another. I've tried require and even autoloading but when I add a function from the old class to the new one it keeps asking for "parameters" in the new object instance and alerts my phpstorm IDE for some reason.
I tried type-hinting (PHPDOC) my IDE but nothing worked so I'm thinking that I'm actually doing something wrong.
So my 2 questions:
- How do you create new instance of an object in a Xenforo 2 add-on class
- How do you add functions from one class to another (without declaring them static obviously)
Thanks for your help. I've been at it for a while and can't figure out why my IDE is being alerted from a new class instance that seemed perfectly fine. I tried /** @var myClass $variable */
But no luck on type hinting. Not sure why it's asking for parameters in a new class instance.
- I can't figure out how to carry over all my work in one class to the next.
- I can't find a way to create a new instance of an object in a separate class file
What I want to do is call functions from one class to another. I've tried require and even autoloading but when I add a function from the old class to the new one it keeps asking for "parameters" in the new object instance and alerts my phpstorm IDE for some reason.
I tried type-hinting (PHPDOC) my IDE but nothing worked so I'm thinking that I'm actually doing something wrong.
So my 2 questions:
- How do you create new instance of an object in a Xenforo 2 add-on class
- How do you add functions from one class to another (without declaring them static obviously)
Thanks for your help. I've been at it for a while and can't figure out why my IDE is being alerted from a new class instance that seemed perfectly fine. I tried /** @var myClass $variable */
But no luck on type hinting. Not sure why it's asking for parameters in a new class instance.