Okay it says.
Factory pattern says it will create object for you.
An example of factory pattern codes,
Code:
<?php
interface IUser
{
  function getName();
}

class User implements IUser
{
  public static function Load( $id ) 
  {
        return new User( $id );
  }

  public static function Create( ) 
  {
        return new User( null );
  }

  public function __construct( $id ) { }

  public function getName()
  {
    return "Jack";
  }
}

$uo = User::Load( 1 );
echo( $uo->getName()."\n" );
?>
So when is the best time to use Factory Pattern.
And can you guys give sample scenario.

Thank you very much in advanced.