Implement a general purpose Systemlib SessionModule wrapper
commite389ed81dde31f2b9f23403f0b092f4dd6963f34
authorSara Golemon <sgolemon@fb.com>
Mon, 5 Aug 2013 20:23:39 +0000 (5 13:23 -0700)
committerSara Golemon <sgolemon@fb.com>
Tue, 6 Aug 2013 16:23:14 +0000 (6 09:23 -0700)
tree0121909c846c615b410861b0871eb7d53db3d8b5
parent328607b4a8648f6d12f0a43307c9a992a7cf04e0
Implement a general purpose Systemlib SessionModule wrapper

To implement a session module in PHP, add a small C++ class
in runtime/ext/ext_session.cpp

  static class MySesionModule : public SystemlibSessionModule {
   public:
    MySessionModule() : SystemlibSessionModule('my', 'MySessionModuleImpl') {}
  } s_my_session_module;

Where 'my' is the name of the session handler (as known by the ini setting)
'MySessionModuleImpl' is the Systemlib PHP class implementing SessionHandlerInterface

Differential Revision: D872889
hphp/runtime/ext/ext_session.cpp
hphp/runtime/ext/ext_session.h