Created
February 21, 2016 19:40
-
-
Save Aaron3/f4d52fe10acbebf2207c to your computer and use it in GitHub Desktop.
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 | |
$namespace = 'aBase\\'; | |
$classes = get_declared_classes(); | |
$keys = preg_grep('/ComposerAutoloaderInit*/', $classes); | |
foreach ($keys as $composerLoader) { | |
if (method_exists($composerLoader, 'getLoader')) { | |
$composer = $composerLoader::getLoader(); | |
if($composer && $composer->getPrefixesPsr4()){ | |
if(array_key_exists($namespace, $composer->getPrefixesPsr4())){ | |
$abase_composer = $composerLoader::getLoader(); | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment