pval *current;
int namelen;
int has_value;
+ PSLS_FETCH();
for(p = q = val; (p < endptr) && (q = strchr(p, '|')); p = q) {
if(p[0] == '!') {
_php_session_initialize();
}
+/* {{{ proto string session_name([string newname])
+ return the current session name. if newname is given, the session name is replaced with newname */
PHP_FUNCTION(session_name)
{
pval *p_name;
RETVAL_STRING(old, 0);
}
+/* }}} */
+/* {{{ proto string session_module_name([string newname])
+ return the current module name used for accessing session data. if newname is given, the module name is replaced with newname */
PHP_FUNCTION(session_module_name)
{
pval *p_name;
RETVAL_STRING(old, 0);
}
+/* }}} */
+/* {{{ proto string session_save_path([string newname])
+ return the current save path passed to module_name. if newname is given, the save path is replaced with newname */
PHP_FUNCTION(session_save_path)
{
pval *p_name;
RETVAL_STRING(old, 0);
}
+/* }}} */
+/* {{{ proto string session_id([string newid])
+ return the current session id. if newid is given, the session id is replaced with newid */
PHP_FUNCTION(session_id)
{
pval *p_name;
RETVAL_STRING(old, 0);
}
+/* }}} */
+/* {{{ proto session_register(string varname)
+ adds varname to the list of variables which are freezed at the session end */
PHP_FUNCTION(session_register)
{
pval *p_name;
if(!PS(nr_open_sessions)) _php_session_start();
PS_ADD_VAR(p_name->value.str.val);
}
+/* }}} */
+/* {{{ proto session_unregister(string varname)
+ removes varname from the list of variables which are freezed at the session end */
PHP_FUNCTION(session_unregister)
{
pval *p_name;
PS_DEL_VAR(p_name->value.str.val);
}
+/* }}} */
+/* {{{ proto string session_encoded()
+ serializes the current setup and returns the serialized representation */
PHP_FUNCTION(session_encoded)
{
int len;
enc = _php_session_encode(&len);
RETVAL_STRINGL(enc, len, 0);
}
+/* }}} */
+/* {{{ proto session_decode(string data)
+ deserializes data and reinitializes the variables */
PHP_FUNCTION(session_decode)
{
pval *str;
_php_session_decode(str->value.str.val, str->value.str.len);
}
+/* }}} */
+/* {{{ proto session_start()
+ Begin session - reinitializes freezed variables, registers browsers etc */
PHP_FUNCTION(session_start)
{
_php_session_start();
}
+/* }}} */
void php_rinit_globals(php_ps_globals *ps_globals)
{