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 Facade{ | |
| private static $service = null; | |
| public static function getKey(){ | |
| return 'world'; | |
| } | |
| public static function __callstatic($method,$args){ | |
| if(!isset(self::$service)){ | |
| self::$service = ServiceLocator::getInstance()->getService(self::getKey()); | |
| } |
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 HandleIterator { | |
| public function getNextHandle(); | |
| public function dataCallback($data); | |
| } | |
| class IndexHandleIterator implements HandleIterator{ | |
| private $curl; | |
| private $count; | |
| public function __construct(){ | |
| $this->curl = curl_init("http://localhost/index.php"); |
NewerOlder