Object Programming in PHP
Object Oriented Programming is the neat little thing you can see everywhere in vBulletin code using the syntax $vbulletin->function.It is basically a variable that contains functions or any code you like.
So the base of an object is to create the class which looks something like this: Code:
class nameofclass { Code:
class nameofclass { But when you would try to echo it it would give you an error that the function is a non-object.For that we have to construct the actual object: Code:
class nameofclass { This was a very short introduction to OOP. |
I'm making an external script to post to a vBulletin forum. I pretty much need to do it an existing class. The problem is I need to require global.php within the class itself. This script errors when I move the require to inside the constructor. I have no clue why.
PHP Code:
|
imho, this article doesn't even begin to explain object-oriented programming in PHP.
@budlight, it would help if you copy / pasted the error here. |
All times are GMT. The time now is 02:31 PM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|