Created
November 9, 2014 17:51
-
-
Save cawa87/057f82ccc143e678a20c to your computer and use it in GitHub Desktop.
psr-4 autoload
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 | |
require_once 'Psr4AutoloaderClass.php'; | |
$loader = new Psr4AutoloaderClass; | |
// регистрируем загрузчик | |
$loader->register(); | |
// регистрируем базовые директории для префикса пространства имён | |
$loader->addNamespace('FirstNamespace', './src'); | |
$testClass = new \FirstNamespace\Test(); | |
var_dump($testClass); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Сам класс Test