title: Factory Method Design Pattern -PHP
body: <p>I am reading about factory design pattern, this pattern comes in 3 forms, simple factory, factory method and abstract factory. </p>
  
  <p>what I understand, that's simple factory is not a design pattern, it just a type of encapsulate the object creation code in conjunction with if/switch statement or direct loading for the classes with exception if the class not exist!.</p>
  
  <p>When I tried to move to factory method I can't find a clear enough example to defer it from simple factory. </p>
  
  <p>could you guys give an example that's explain the factory method and how its defer from simple factory?</p>
  
  <p>Thank you. </p>