Thread: New approach
View Single Post
Old 04-29-2008, 02:39 PM   #1 (permalink)
Evulness
The Contributor
 
Evulness's Avatar
 
Join Date: Apr 2008
Location: Tampa, FL
Posts: 65
Thanks: 6
Evulness is on a distinguished road
Default New approach

over the weekend, i decided to retry my CMS from scratch. Not only because it wasn't organized, but because the code was ugly.

i wanted alittle bit more organization in my classes...

Well, heres my problem...
i have db.class, session.class as my 2 base classes.
the way i'm planning, everything else will be extended from these.

right now I've got the database class down to basics. connect(), query(), fetch(), get_one(). and my session class is simple, start() set, unset, destroy, show, verify.

now, i am in NO way, adept at oop, i'm still learning. took me all weekend to write these 2 from scratch. before i used tuts and shit as a guide. which was good, becausw what i wrote worked, surprisingly, but after looking it over, i thought of things to make it better.... and tada, we have my 2 new classes...
Evuldb.class
EvulSession.class

question i have is... how can i use both classes in a new class? if i can't extend more than 1?

aka, as an example:
how they extended their user.php from mysql.php
TechTuts - Learn. Share. Create.

yet, how can i extend 1 "user.class" from BOTH db.class and session.class in this mannor?

or rather is there a way i can use these classes in a new one? like maybe extend one, and include the other?
if i read right, and understand classes and oop right... then i can't do it in a class, i would have to do regular functions and expressions, etc...
right?
__________________
"Knowledge is power. Abuse it."~Evulness
My portfolio: www.evularts.com
Send a message via AIM to Evulness
Evulness is offline  
Reply With Quote