I am writing a custom session handler in PHP and 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 set the open function to be private without any errors, but when I make the write method private it barks at me.
Fatal error: Call to private method Session::write() from context '' in Unknown on line 0
I was just wondering if this was a bug or there is a way around this. Barring that I can certainly just make it public, but I'd rather not. There was a post from last year on php.net eluding to a similar thing, but just want to know if anyone had any ideas. Does it really matter? I am using PHP 5.2.0 on my development box, but could certainly upgrade.