Created
April 17, 2013 16:47
-
-
Save ericmann/5405878 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 | |
// Interface | |
inferface ArchiveElement { | |
public function do_something(); | |
} | |
class TC_Video implements ArchiveElement { | |
public function do_something() { | |
// does something | |
} | |
} | |
// Abstract | |
abstract class ArchiveElement { | |
abstract public function do_something(); | |
protected function do_something_else() { | |
// ... do something else | |
} | |
} | |
class TC_Video extends ArchiveElement { | |
public function do_something() { | |
// does something | |
$this->do_something_else(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment