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 | |
| /* | |
| Example of simple automatic dependency injection using only interface. | |
| this code is equivalent to: | |
| $service = new \MyService\Service; | |
| $invoice = new \Application\Invoice; |
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 | |
| /** | |
| * SPL Class Loader for NameSpace classes using closure. | |
| * ex: spl_autoload_register( ClassLoader() ); | |
| * copied from https://gist.github.com/221634 | |
| * @param $path | |
| * @param array $option | |
| * @return closure | |
| */ |
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 | |
| /** | |
| * compare performance of underscore.php, arry.php, and _ww.php. | |
| */ | |
| require_once __DIR__ . '/../Underscore.php/underscore.php'; | |
| require_once __DIR__ . '/../arry/Arry.php'; | |
| require_once __DIR__ . '/../_ww/_ww.php'; | |
| /** |
NewerOlder