Welcome Guest, Not a member yet? Register   Sign In
Extend library with own class
#1

[eluser]Hyra[/eluser]
Hey hey,

can't find what I'm looking for in current threads, possibly because I'm not quite sure what to look for.

What i want to do: Extend a custom library with a custom class

On my site I will have several "Rewards" which will have a lot of the same functionality regarding loading and displaying.

So what i want to be able to write is a library like:

Code:
class CustomReward extends Reward {
// all custom functions
};

But the Reward class, sitting in the libraries folder, won't be loaded. I get a blank page if I try this.

Is it possible at all to do this?

(One alternative i haven't tried but might work is to "include" the file containing the mother-reward-class, and work with it like that, but this seems ugly.)


Messages In This Thread
Extend library with own class - by El Forum - 10-12-2009, 03:31 AM
Extend library with own class - by El Forum - 10-12-2009, 03:50 AM
Extend library with own class - by El Forum - 10-12-2009, 03:55 AM
Extend library with own class - by El Forum - 10-12-2009, 04:04 AM
Extend library with own class - by El Forum - 10-12-2009, 04:14 AM



Theme © iAndrew 2016 - Forum software by © MyBB