|
Posted by Hendri Kurniawan on 01/08/07 13:22
>
>
> Singleton... I like... :)
>
> <?php
> function & generateSelf() {
> static $self = null;
> if(is_null($self)) $self = new EditResultGenerator();
> return $self;
> }
> ?>
>
>
> Hendri Kurniawan
Sorry (forgot static keyword in front of function
<?php
static function & generateSelf() {
static $self = null;
if(is_null($self)) $self = new EditResultGenerator();
return $self;
}
?>
Hendri Kurniawan
Navigation:
[Reply to this message]
|