Created
June 4, 2017 20:40
-
-
Save goldhat/19b4756edb1b2a0dacb6b8982618907c to your computer and use it in GitHub Desktop.
quizmaster_extension_autoload.php
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
public static function autoload( $class, $dir ) { | |
$registeredExtensions = $this->register(); | |
print '<pre>'; | |
var_dump( $registeredExtensions ); | |
print '</pre>'; | |
foreach( $registeredExtensions as $ext => $extSettings ) { | |
if( $extSettings['type'] == 'pro' ) { | |
$classPath = QUIZMASTER_PATH . '/pro/extensions/' . $ext . '/lib/' . $dir . '/' . $class . '.php'; | |
print '<pre>'; | |
var_dump( $classPath ); | |
print '</pre>'; | |
if (file_exists($classPath)) { | |
include_once $classPath; | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment