|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
|
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
|
|||
|
|||
|
class extension
ya its me again with yet another question! this one involves class extending. here is my line of code:
PHP Code:
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:
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! |
|
#2
|
|||
|
|||
|
its probally because it thinks that one of those names is a constant. try
PHP Code:
|
|
#3
|
|||
|
|||
|
it is a constant. and i tried it with the {} brackets and its giving me the errors of an unexpected "{" now.
|
|
#4
|
|||
|
|||
|
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). |
![]() |
| Viewing: Dev Articles Community Forums > Programming > General Programming Help > class extension |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|