I am writing a special session handler in PHP and am trying to make the methods defined in session_set_save_handler private.
session_set_save_handler(
array('Session','open'),
array('Session','close'),
array('Session','read'),
array('Session','write'),
array('Session','destroy'),
array('Session','gc')
);
For example, I can configure an open function as confidential without any errors, but when I make the recording method private, it barks at me.
Fatal error: calling private method Session :: write () from context '' in Unknown at line 0
I'm just wondering if this was a mistake, or is there a way around this. The ban on the fact that I can, of course, just make it publicly available, but I would prefer. Last year, a publication appeared on php.net that talked about a similar thing, but I just want to know if anyone has any ideas. Does it really matter? I use PHP 5.2.0 in my development window, but it can certainly be updated.
source
share