![]() |
Custom Class - vBulletin
Hello,
Looking to create a custom class called League. This is going to be integrated with vBulletin. I want to use be able to use the $vbulletin->userinfo[]; inside the methods...if that makes sense. Here is what i have. League.php PHP Code:
PHP Code:
PHP Code:
How do i create a custom class and be able to use the $vbulletin, $db methods/objects etc? Sorry for confusing questions. Hope someone can help me with this. :) Thanks. |
Firstly, a constructor method is "__construct()". Secondly, "$this" refers to the current object, not another object. Thirdly, you actually need to populate your variables. :)
PHP Code:
|
Thank you so much!!!
:) |
By the way, keep in mind that magic methods (e.g. __construct()) and private/protected/public/static/etc. keywords only exist in PHP 5.
|
Don't copy the object, reference it.
PHP Code:
|
All times are GMT. The time now is 01:06 AM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|