TalkPHP
 
 
Account Login
Latest Articles
» The basic usage of PHPTAL, a XML/XHTML template library for PHP
» Vulnerable methods and the areas they are commonly trusted in.
» Simple way to protect a form from bot
» The Basics On: How Session Stealing Works
» How to keep your forms from double posting data
IRC Channel
IRC Speech Bubble Join the friendly bunch on IRC...
(#TalkPHP on Freenode)

...Also available via a web interface.

See this thread for information on the TalkPHP Free Hugs Initiative™. Subject to availability.
Associates
Associates
CSS Tutorials
 
 
LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
Old 04-29-2008, 02:39 PM   #1 (permalink)
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
 



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


All times are GMT. The time now is 03:20 PM.

 
     

Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0
Inactive Reminders By Icora Web Design