This file contains 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 | |
// Respect\Database is an easy API for any database with dead simple drivers | |
use Respect\Database\Data; | |
$data = new Data(array( | |
'p001' => new PDO(/*...*/), | |
'tweets' => new Mongo(/*...*/), | |
'timelines' => new Predis\Client(/*...*/), |
This file contains 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 ServiceLocator | |
{ | |
protected static $locator; | |
public static function load(ServiceLocator $locator) | |
{ | |
self::$locator = $locator; | |
} |