Remove logic handling `Exception::$trace` as a resource
[hiphop-php.git] / hphp / runtime / ext / extension-registry.h
blobe7d710b0dd243ad13b2cd3631a098c620f7b0caf
1 #pragma once
3 #include "hphp/runtime/ext/extension.h"
4 #include "hphp/runtime/base/ini-setting.h"
5 #include "hphp/runtime/base/type-string.h"
6 #include "hphp/util/hdf.h"
8 namespace HPHP {
10 namespace jit {
11 struct ProfDataSerializer;
12 struct ProfDataDeserializer;
15 namespace ExtensionRegistry {
16 /////////////////////////////////////////////////////////////////////////////
18 void registerExtension(Extension* ext);
20 bool isLoaded(const char* name, bool enabled_only = true);
21 inline bool isLoaded(const String& name, bool enabled_only = true) {
22 return isLoaded(name.data(), enabled_only);
25 Extension* get(const char* name, bool enabled_only = true);
26 inline Extension* get(const String& name, bool enabled_only = true) {
27 return get(name.data(), enabled_only);
30 Array getLoaded(bool enabled_only = true);
32 // called by RuntimeOption to initialize all configurations of extension
33 void moduleLoad(const IniSetting::Map& ini, Hdf hdf);
35 // called by hphp_process_init/exit
36 void cliClientInit();
37 void moduleInit();
38 void moduleShutdown();
39 void threadInit();
40 void threadShutdown();
41 void requestInit();
42 void requestShutdown();
44 bool modulesInitialised();
46 void serialize(jit::ProfDataSerializer& ser);
47 void deserialize(jit::ProfDataDeserializer& des);
49 /////////////////////////////////////////////////////////////////////////////
50 } // namespace HPHP::ExtensionRegistry