Re: php5 and possible oop features/questions
| From: | Devish | Date: | Sun, 05 Oct 2003 12:25:19 +0000 |
| Subject: | Re: php5 and possible oop features/questions | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-165085@lists.php.net to get a copy of this message | ||
if you want to use variable's in a function you need to give
the function the paramaters..if you do not with to use it like that..
declare the vars in the beginning of the class
class classname
{
var $1;
var $2;
}
greetz
--
----------------------------------------------
It's Not God That Created Us, It's Us That Created God!
"Tit "Black" Petric" <black@scene-si.org> wrote in message
news:20031005121558.53413.qmail@pb1.pair.com...
> will something in the likes of this be possible in php5?
>
> /***/
>
> class some_classname
> {
> function some_function();
> }
>
> function some_classname::some_function($prefix, $text) {
> return $prefix.": ".$text."\n";
> }
>
> $test = new some_classname;
> $test->some_function("Output","Hello World!");
>
> /***/
>
> how about object/class aggregation from php4 (it was experimental and i
> imagine it still has a few bugs left, but it was a really usefull
> feature)..?
>
> i know the following is possible:
>
> class class_name implements class1, class2, class3 extends parent_class {
> ...
> }
>
> but, can you do something more dynamic, so you can tell which classes to
> implement at runtime? class class_name implemenets $vars extends
> parent_class ?