mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-21 20:19:44 +00:00
Tree growing!
This commit is contained in:
parent
8f6ed22158
commit
2353457b5b
10 changed files with 163 additions and 5 deletions
|
|
@ -69,6 +69,7 @@ if($errors > 0){
|
|||
}
|
||||
|
||||
|
||||
|
||||
require_once("classes/Data.class.php");
|
||||
require_once("classes/Player.class.php");
|
||||
require_once("classes/Generator.class.php");
|
||||
|
|
@ -84,5 +85,6 @@ require_once("classes/SerializedPacketHandler.class.php");
|
|||
require_once("classes/CustomPacketHandler.class.php");
|
||||
require_once("classes/MinecraftInterface.class.php");
|
||||
require_once("classes/BigInteger.class.php");
|
||||
require_all("misc/");
|
||||
|
||||
?>
|
||||
|
|
@ -26,6 +26,21 @@ the Free Software Foundation, either version 3 of the License, or
|
|||
*/
|
||||
|
||||
|
||||
function require_all($path, &$count = 0){
|
||||
$dir = dir($path."/");
|
||||
while(false !== ($file = $dir->read())){
|
||||
if($file !== "." and $file !== ".."){
|
||||
if(!is_dir($path.$file) and strtolower(substr($file, -3)) === "php"){
|
||||
require_once($path.$file);
|
||||
++$count;
|
||||
}elseif(is_dir($path.$file)){
|
||||
require_all($path.$file."/", $count);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function hard_unset(&$var){
|
||||
if(is_object($var)){
|
||||
$unset = new ReflectionClass($var);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue