Skip to content

Instantly share code, notes, and snippets.

@gregorycu
Created March 10, 2012 15:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gregorycu/2011764 to your computer and use it in GitHub Desktop.
Save gregorycu/2011764 to your computer and use it in GitHub Desktop.
<?php
class Factory {
function Make() {
return new Widget();
}
}
class Widget {
private function __construct() {
}
}
$f = new Factory();
$d = $f->Make();
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment