SitePoint Sponsor

User Tag List

Page 2 of 2 FirstFirst 12
Results 26 to 27 of 27
  1. #26
    simple tester McGruff's Avatar
    Join Date
    Sep 2003
    Location
    Glasgow
    Posts
    1,690
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Either the factory knows how to pick the correct logger...
    PHP Code:
     function getModel() {
         if(...) {
             return new 
    Model(FooLog::instance());
         } else {
             return new 
    Model(BarLog::instance());
     } 
    ...or the selection logic is performed by the client in which case it will need a reference to the factory/assembler object. I think assemblers should be pretty dumb but that's another subject.

  2. #27
    Non-Member melancholic's Avatar
    Join Date
    Nov 2004
    Location
    Australia
    Posts
    447
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Ahh right. I understand. Thanks for taking the time to explain guys.


    regards,


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
  •