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"
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
38 void moduleShutdown();
40 void threadShutdown();
42 void requestShutdown();
44 bool modulesInitialised();
46 void serialize(jit::ProfDataSerializer
& ser
);
47 void deserialize(jit::ProfDataDeserializer
& des
);
49 /////////////////////////////////////////////////////////////////////////////
50 } // namespace HPHP::ExtensionRegistry