The Arcive of vBulletin Modifications Site. |
|
|
#1
|
|||
|
|||
|
OOP is giving me a headache. I'm working on vbspace, and I'm just messing around with the space class...is this correct for the most part? It's not the full class just one function
PHP Code:
|
|
#2
|
||||
|
||||
|
Sadly, yes.
|
|
#3
|
|||
|
|||
|
Also, make sure $db is globalized somehow (add global $db before calling it for example).
|
|
#4
|
|||
|
|||
|
Just another question, when I use the class and make a new instance of it
PHP Code:
|
|
#5
|
|||
|
|||
|
Yes, as long as you are inside a function of that class.
|
|
#6
|
|||
|
|||
|
How would I get $new->cache to have the same value outside of the function? Make it global?
|
|
#7
|
|||
|
|||
|
Outside your class you would use $new->cache, inside you use $this->cache
|
|
#8
|
|||
|
|||
|
Okay, thanks Marco!
|
![]() |
|
|
| X vBulletin 3.8.12 by vBS Debug Information | |
|---|---|
|
|
More Information |
|
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|