Menu

Event handling

2006-11-19
2013-03-21
  • Mick Faraday

    Mick Faraday - 2006-11-19

    Hello,

    First of all thanks for the great file browser.

    But there is one feature I missed:
    The possibility to define your own actions that OFB performs whenever
    a file or directory is uploaded, created, moved, deleted, etc.

    One possible solution could be to define an interface IEventHandler with abstract
    functions like makeDir(.), makeFile(.), rm(.), etc. and classes that implement it.
    That would make it possible to create your own EventHandler classes (e.g. for
    database operations, additional filesystem operations, sending e-mails, etc.) and to add them to classes like Browser.php and BrowserHelpser.php.

    Example:

    $browser = new Browser();
    $browser->addEventHandler(new DefaultEventHandler());
    $browser->addEventHandler(new MyEventHandler());

    (DefaultEventHandler, MyEventHandler implement IEventHandler)

    Cheers,
    Mick.

     
    • Marek Blotny

      Marek Blotny - 2006-11-20

      Hello Mick,

      I must admit that I totally agree with you, such extension could be very useful. So far, there ware no such requests so things like that had low priority. Although, it seems that people are now much more familiar with OFB and such sophisticated features are welcome.

      From implementation perspective this feature should be fairly easy to add, so I think it should be a part of next release.

      Thanks for your suggestion!

      Cheers, Marek

       
    • Mick Faraday

      Mick Faraday - 2006-11-21

      Hello Marek,

      Thanks for your reply.
      As soon as the new release is available, I would like send you
      some EventHandler.

      Cheers, Mick.

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.