Re: event-based oop design
| From: | Uioreanu Calin | Date: | Thu, 15 Mar 2001 07:40:08 +0000 |
| Subject: | Re: event-based oop design | ||
| References: | 1 2 | Groups: | php.pear |
| Request: | Send a blank email to php-pear+get-1845@lists.php.net to get a copy of this message | ||
Threads would imply an application server, isn't it?
For now I haven't met a PHP extension for such thing, only heard of.
This would be a major turn for php, I think.
I was referring to an user-instance-only event-based approach.
Working on a big project, hundreads of objects, I wanted to know
if an error popped up somewhere, or an event of given type happened.. For
now error reporting is one-dimension push into a reporting channel. I was
curious if anyone tried this.
Tick is interesting!
Calin
""Jesus M. Castagnetto"" <jcastagnetto@yahoo.com> wrote in message
news:20010314214448.4396.qmail@web12106.mail.yahoo.com...
> For event based classes to work, would'nt you need
> threads? In java, usually you have listener objects
> and any instance interested in a particular event
> registers with the listener (or a listeners' manager
> object), and then the listener informs the registered
> class when the event occurs, oftentimes this will
> spawn a new thread.
>
> Can't see how this can be done in PHP w/o some
> contortions. Perhaps in an application server in which
> scripts live, like servlets in a servlet server.
>
> As for error reporting, you can always define your own
> error handler(s) in PHP, it is not event based
> java-style, but it will work. Check out the example I
> wrote for the manual entry of set_error_handler().
>
> Perhaps error handling can be implemented similarly to
> how destructors are implemented in PEAR.
>
> --- Uioreanu Calin <uioreanu@hotmail.com> wrote:
> > Hello,
> >
> > Has anyone knowledge of an event based classes
> > structure?
> > Error reporting&about everything could gain
> > dimension.
> >
> > Regards,
> > Calin
> >
> >
> >
> > --
> > PHP Extension and Add-on Repository (PEAR) mailing
> > list.
> > Documentation can be found at
> > http://pear.php.net/doc/pear.html
> > To unsubscribe, e-mail:
> > php-pear-unsubscribe@lists.php.net from the
> > mail address you subscribed with.
> >
>
>
> =====
> --- Jesus M. Castagnetto (jcastagnetto@yahoo.com)
>
> __________________________________________________
> Do You Yahoo!?
> Yahoo! Auctions - Buy the things you want at great prices.
> http://auctions.yahoo.com/
>
> --
> PHP Extension and Add-on Repository (PEAR) mailing list.
> Documentation can be found at http://pear.php.net/doc/pear.html
> To unsubscribe, e-mail: php-pear-unsubscribe@lists.php.net from the
> mail address you subscribed with.
>