SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Member stephanfx's Avatar
    Join Date
    May 2008
    Posts
    1
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Php Master: Observer pattern.

    I am looking to add this pattern to a db table. I looked at the code but i noticed an observer.php in the codebase, which is basically the same as the event.php but it has some differences. My question is which one is correct? which is will be better to implement. Personally i like the observer.php one more.

    Regards

  2. #2
    #titanic {float:none} silver trophy
    molona's Avatar
    Join Date
    Feb 2005
    Location
    from Madrid to Heaven
    Posts
    8,220
    Mentioned
    237 Post(s)
    Tagged
    1 Thread(s)
    Well, if you want to save the information, then you need it... event.php doesn't have any code for saving data whereas observer.php does have it. Since you're talking about db... I assume that you want to keep the information in your database that is, save it

    I have read the book but haven't had the time to go through it properly but that's the main difference I see between both.


Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •