SunQuest
 
           General Programming Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsProgrammingGeneral Programming Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
AT&T devCentral & BlackBerry(r) Webcast Series: BlackBerry and GPS -Build Location Awareness into your BlackBerry Applications, July 10th-1:00PM EST. Register Today!
  #1  
Old February 3rd, 2003, 05:31 PM
melonn melonn is offline
Junior Member
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Nov 2002
Location: Canada
Posts: 11 melonn User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Send a message via ICQ to melonn Send a message via AIM to melonn
class extension

ya its me again with yet another question! this one involves class extending. here is my line of code:

PHP Code:
class xdbaConnect extends xdba DATABASE_TYPE


currently php doesn't like that and spits out this error: Parse error: parse error, unexpected '.', expecting '{' in /home/xdba/class/xdba_connect.php on line 8. Line 8 being the line i showed you above. what I basically want to be able to do is replace DATABASE_TYPE with a variable. for example. if the type was mysql then the line should read this:

PHP Code:
class xdbaConnect extends xdbaMysql


i want Mysql to be replaced with any type that I put in there. does anyone have a suggestion on how I may go about doing this? thanks again for your help!

Reply With Quote
  #2  
Old February 3rd, 2003, 06:29 PM
Ben Rowe
Guest
Dev Articles Newbie (0 - 499 posts)
 
Posts: n/a  
Time spent in forums:
Reputation Power:
its probally because it thinks that one of those names is a constant. try

PHP Code:
class xdbaConnect extends {xdba DATABASE_TYPE}{ 

Reply With Quote
  #3  
Old February 3rd, 2003, 07:02 PM
melonn melonn is offline
Junior Member
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Nov 2002
Location: Canada
Posts: 11 melonn User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Send a message via ICQ to melonn Send a message via AIM to melonn
it is a constant. and i tried it with the {} brackets and its giving me the errors of an unexpected "{" now.

Reply With Quote
  #4  
Old February 5th, 2003, 05:39 AM
Jeb. Jeb. is offline
"l33t? What's l33t?"
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Aug 2002
Posts: 51 Jeb. User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 6
Send a message via AIM to Jeb.
You can't do it, unfortunately.

You could try the aggregation functions...:

http://au2.php.net/manual/en/ref.objaggregation.php

You should be able to use them to do what you need - just remember that they don't work on initialised classes, only their structures (meaning it will give default property values, etc etc).
__________________
Jeb.

AIM: JebediahMc - PM Me - E-Mail Me


Reply With Quote
Reply

Viewing: Dev Articles Community ForumsProgrammingGeneral Programming Help > class extension


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 

Iron Speed




© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 6 hosted by Hostway