| modification, are permitted provided that the conditions mentioned |
| in the accompanying LICENSE file are met. |
+--------------------------------------------------------------------+
- | Copyright (c) 2004-2010, Michael Wallner <mike@php.net> |
+ | Copyright (c) 2004-2011, Michael Wallner <mike@php.net> |
+--------------------------------------------------------------------+
*/
-/* $Id $ */
-
#include "php_http.h"
#include <main/SAPI.h>
zend_hash_get_current_data_ex(Z_ARRVAL_PP(hsv), (void *) &header, &pos);
Z_ADDREF_P(*header);
- zend_hash_add(PHP_HTTP_G->env.request.headers, key.str, key.len, (void *) header, sizeof(zval *), NULL);
+ zend_symtable_update(PHP_HTTP_G->env.request.headers, key.str, key.len, (void *) header, sizeof(zval *), NULL);
efree(key.str);
}
php_http_env_get_request_headers(NULL TSRMLS_CC);
- if (SUCCESS == zend_hash_find(PHP_HTTP_G->env.request.headers, key, name_len + 1, (void *) &zvalue)) {
+ if (SUCCESS == zend_symtable_find(PHP_HTTP_G->env.request.headers, key, name_len + 1, (void *) &zvalue)) {
zval *zcopy = php_http_ztyp(IS_STRING, *zvalue);
val = estrndup(Z_STRVAL_P(zcopy), Z_STRLEN_P(zcopy));
int got;
php_http_env_get_request_headers(NULL TSRMLS_CC);
- got = zend_hash_exists(PHP_HTTP_G->env.request.headers, key, name_len + 1);
+ got = zend_symtable_exists(PHP_HTTP_G->env.request.headers, key, name_len + 1);
efree(key);
return got;
if ((SUCCESS != zend_hash_find(&EG(symbol_table), ZEND_STRS("_SERVER"), (void *) &hsv)) || (Z_TYPE_PP(hsv) != IS_ARRAY)) {
return NULL;
}
- if ((SUCCESS != zend_hash_find(Z_ARRVAL_PP(hsv), key, key_len + 1, (void *) &var))) {
+ if ((SUCCESS != zend_symtable_find(Z_ARRVAL_PP(hsv), key, key_len + 1, (void *) &var))) {
return NULL;
}
if (check && !((Z_TYPE_PP(var) == IS_STRING) && Z_STRVAL_PP(var) && Z_STRLEN_PP(var))) {
zval **zvalue;
char *key = php_http_pretty_key(estrndup(name_str, name_len), name_len, 1, 1);
- if (SUCCESS == zend_hash_find(&headers, key, name_len + 1, (void *) &zvalue)) {
+ if (SUCCESS == zend_symtable_find(&headers, key, name_len + 1, (void *) &zvalue)) {
zval *zcopy = php_http_ztyp(IS_STRING, *zvalue);
val = estrndup(Z_STRVAL_P(zcopy), Z_STRLEN_P(zcopy));
PHP_HTTP_ARG_VAL(ident, 0)
PHP_HTTP_END_ARGS;
-PHP_HTTP_BEGIN_ARGS(persistentHandlesIdent, 0)
- PHP_HTTP_ARG_VAL(name, 0)
-PHP_HTTP_END_ARGS;
-
PHP_HTTP_BEGIN_ARGS(parseParams, 1)
PHP_HTTP_ARG_VAL(params, 0)
PHP_HTTP_ARG_VAL(flags, 0)
zend_declare_class_constant_long(php_http_env_class_entry, ZEND_STRL("PARAMS_DEFAULT"), PHP_HTTP_PARAMS_DEFAULT TSRMLS_CC);
zend_declare_class_constant_long(php_http_env_class_entry, ZEND_STRL("PARAMS_COLON_SEPARATOR"), PHP_HTTP_PARAMS_COLON_SEPARATOR TSRMLS_CC);
- PHP_HTTP_REGISTER_CLASS(http\\env, Request, http_env_request, php_http_message_class_entry, 0);
+ PHP_HTTP_REGISTER_CLASS(http\\Env, Request, http_env_request, php_http_message_class_entry, 0);
return SUCCESS;
}