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 | |
| class IntegerRange implements Iterator{ | |
| private $start; | |
| private $end; | |
| private $current; | |
| public function __construct($start, $end){ | |
| $this->start = $start; | |
| $this->end = $end; | |
| $this->current = $start; | |
| } |
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 | |
| abstract class SongComposite{ | |
| public function songInfo(){} | |
| } | |
| class Song extends SongComposite{ | |
| private $songTitle; | |
| private $songBand; | |
| public function __construct($sTitle, $sBand){ | |
| $this->songTitle = $sTitle; |
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 | |
| /* | |
| Observer Design Pattern - Weather Station Example | |
| */ | |
| abstract class Observer{ | |
| public function update(){} | |
| } | |
| abstract class Subject{ |
OlderNewer