Created
July 16, 2017 07:58
-
-
Save Muqsit/f601257fd20c36b05a875a63939a8c38 to your computer and use it in GitHub Desktop.
loadEveryClassToCheckForErrorsBecauseICannotAffordGoodIDEs
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
private function loadEveryClassToCheckForErrorsBecauseICannotAffordGoodIDEs($directory = "/root/pmmp/plugins/CosmicCore-master/src/CosmicCore") | |
{ | |
if(is_dir($directory)) { | |
$scan = scandir($directory); | |
unset($scan[0], $scan[1]); //unset . and .. | |
foreach($scan as $file) { | |
if(is_dir($directory."/".$file)) { | |
$this->loadEveryClassToCheckForErrorsBecauseICannotAffordGoodIDEs($directory."/".$file); | |
} else { | |
if(strpos($file, '.php') !== false) { | |
require_once($directory."/".$file); | |
} | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment