Re: PHP events, listener, trigger

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

stream/file is it the same?....the php function list dosen't have any
programs the clearly use the function maybe you could give me a link

$read = file( './logfile.txt' ) ;
if( false === stream_select( $read, $write = NULL, $except = NULL, 0 ) ) 
	print "no change on file" ;
else
	print "change on file is present" ;

thanks in advance,
Coco

--- In php-objects@xxxxxxxxxxxxxxx, Laurent Valdes <valderama@xxxx> wrote:
>
> Hi,
> 
> historically, the problem of listeners, triggers, etc,
> is that those things are what we call a
> 'design pattern'.
> 
> When doing database programming, the DBMS calls the trigger.
> Inside Swing or GUI toolkit, the toolkit calls listeners by itself,
> since you register a listener with an object, to make the object able
> to signal the listener one of its properties has changed.
> 
> In this field, if we tackle the problem of PHP, the problem is that
> whe need to register the PHP script with a file.
> 
> And it can be made with stream_select wich calls the select() C POSIX
> function internally. The C select function makes some calls to the OS
> internals. then the kernel awake the process when the given file or
> stream has changed.
> http://fr2.php.net/manual/en/function.stream-select.php
> 
> Good Luck,
> Laurent.
> 
> 
> 2005/12/19, mamontesines <mamontesines@xxxx>:
> >  Hi,
> >
> >  Iam wondering has anyone tried a program that can do an onUpdate
> >  function? like for example I want to run a program that waits until a
> >  file is updated then a status report is displayed or the file is
> >  displayed on update/change without any use of loops.
> >
> >  like triggers....if a database is updated or new data is inserted
> >  there will be a trigger that launch a file or function.
> >
> >  if anyone has done this may you share it to us?
> >
> >  thanks,
> >  coco
> >
> >
> --
> «Un peu d'internationalisme éloigne de la patrie; beaucoup y ramène»
> Jean Jaurès@<http://www.le-valdo.com>
>







------------------------ Yahoo! Groups Sponsor --------------------~--> 
Most low income homes are not online. Make a difference this holiday season!
http://us.click.yahoo.com/5UeCyC/BWHMAA/TtwFAA/saFolB/TM
--------------------------------------------------------------------~-> 

PHP Data object relational mapping generator - http://www.meta-language.net/ 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/php-objects/

<*> To unsubscribe from this group, send an email to:
    php-objects-unsubscribe@xxxxxxxxxxxxxxx

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 





[Index of Archives]     [PHP Home]     [PHP Users]     [PHP Soap]     [Kernel Newbies]     [Yosemite]     [Yosemite Campsites]

  Powered by Linux