Created
January 20, 2017 06:48
-
-
Save alexweissman/1862ee4970956345a94373c6c807cbe5 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// suppose class FancyPost extends Post | |
// Do things using the Post class | |
$myPost = new Post(); | |
Post::doSomething(); | |
// Override | |
Post::mapClass('FancyPost'); | |
// Now these statements will use FancyPost instead of Post | |
$myFancyPost = new Post(); | |
Post::doSomething(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment