diff --git a/src/ncc/Classes/PhpExtension/PhpRuntime.php b/src/ncc/Classes/PhpExtension/PhpRuntime.php new file mode 100644 index 0000000..20aeb4f --- /dev/null +++ b/src/ncc/Classes/PhpExtension/PhpRuntime.php @@ -0,0 +1,49 @@ +getInstallPaths()->getBinPath() . DIRECTORY_SEPARATOR . 'autoload.php'; + $static_files = $versionEntry->getInstallPaths()->getBinPath() . DIRECTORY_SEPARATOR . 'static_autoload.bin'; + + if(file_exists($autoload_path) && !in_array(RuntimeImportOptions::ImportAutoloader, $options)) + { + require_once($autoload_path); + } + + if(file_exists($static_files) && !in_array(RuntimeImportOptions::ImportStaticFiles, $options)) + { + $static_files = ZiProto::decode(IO::fread($static_files)); + foreach($static_files as $file) + require_once($file); + } + + if(!file_exists($autoload_path) && !file_exists($static_files)) + return false; + + return true; + } + } \ No newline at end of file