|
From: <php...@li...> - 2009-07-03 10:46:09
|
Well, if you use php 5.3 it is indeed easier. In PHP 5.3 you can autoload
Java libraries and import Java classes like ordinary PHP classes. The
following example extends java.lang.String:
<?php java_autoload();
use java\lang\String as JString;
class String extends JString {
function toString(){
return "I am " . parent::toString();
}
function __toString() {return this->toString();}
}
echo new String("foo");
?>
=> I am foo
Regards,
Jost Boekemeier
3. Jul 2009 10:46 vorm. schrieb am <
php...@li...>:
Thank you. Now I see how it has to be done.
Although it's not as fluffy as I would have wished but I guess it will
work. :-)
Cheers,
Alexander Thomas
Am 02.07.2009 um 14:54 schrieb php...@li...
:
> You could use the visitor- or the decorator design pattern to > intercept
the > method calls fr...
|