Lines Matching refs:context
99 php_stream_context *context = NULL; in PHP_FUNCTION() local
107 context = php_stream_context_from_zval(zcontext, flags & PHP_FILE_NO_DEFAULT_CONTEXT); in PHP_FUNCTION()
134 hashkey, &tv, context, &errstr, &err); in PHP_FUNCTION()
184 php_stream_context *context = NULL; in PHP_FUNCTION() local
192 context = php_stream_context_from_zval(zcontext, flags & PHP_FILE_NO_DEFAULT_CONTEXT); in PHP_FUNCTION()
194 if (context) { in PHP_FUNCTION()
195 zend_list_addref(context->rsrc_id); in PHP_FUNCTION()
209 NULL, NULL, context, &errstr, &err); in PHP_FUNCTION()
867 static void user_space_stream_notifier(php_stream_context *context, int notifycode, int severity, in user_space_stream_notifier() argument
870 zval *callback = (zval*)context->notifier->ptr; in user_space_stream_notifier()
914 static int parse_context_options(php_stream_context *context, zval *options TSRMLS_DC) in parse_context_options() argument
932 php_stream_context_set_option(context, wkey, okey, *oval); in parse_context_options()
946 static int parse_context_params(php_stream_context *context, zval *params TSRMLS_DC) in parse_context_params() argument
953 if (context->notifier) { in parse_context_params()
954 php_stream_notification_free(context->notifier); in parse_context_params()
955 context->notifier = NULL; in parse_context_params()
958 context->notifier = php_stream_notification_alloc(); in parse_context_params()
959 context->notifier->func = user_space_stream_notifier; in parse_context_params()
960 context->notifier->ptr = *tmp; in parse_context_params()
962 context->notifier->dtor = user_space_stream_notifier_dtor; in parse_context_params()
966 parse_context_options(context, *tmp TSRMLS_CC); in parse_context_params()
980 php_stream_context *context = NULL; in decode_context_param() local
982 …context = zend_fetch_resource(&contextresource TSRMLS_CC, -1, NULL, NULL, 1, php_le_stream_context… in decode_context_param()
983 if (context == NULL) { in decode_context_param()
989 context = stream->context; in decode_context_param()
990 if (context == NULL) { in decode_context_param()
995 context = stream->context = php_stream_context_alloc(); in decode_context_param()
1000 return context; in decode_context_param()
1009 php_stream_context *context; in PHP_FUNCTION() local
1014 context = decode_context_param(zcontext TSRMLS_CC); in PHP_FUNCTION()
1015 if (!context) { in PHP_FUNCTION()
1020 RETURN_ZVAL(context->options, 1, 0); in PHP_FUNCTION()
1029 php_stream_context *context; in PHP_FUNCTION() local
1044 context = decode_context_param(zcontext TSRMLS_CC); in PHP_FUNCTION()
1045 if (!context) { in PHP_FUNCTION()
1052 RETVAL_BOOL(parse_context_options(context, options TSRMLS_CC) == SUCCESS); in PHP_FUNCTION()
1054 php_stream_context_set_option(context, wrappername, optionname, zvalue); in PHP_FUNCTION()
1065 php_stream_context *context; in PHP_FUNCTION() local
1071 context = decode_context_param(zcontext TSRMLS_CC); in PHP_FUNCTION()
1072 if (!context) { in PHP_FUNCTION()
1077 RETVAL_BOOL(parse_context_params(context, params TSRMLS_CC) == SUCCESS); in PHP_FUNCTION()
1086 php_stream_context *context; in PHP_FUNCTION() local
1092 context = decode_context_param(zcontext TSRMLS_CC); in PHP_FUNCTION()
1093 if (!context) { in PHP_FUNCTION()
1099 …if (context->notifier && context->notifier->ptr && context->notifier->func == user_space_stream_no… in PHP_FUNCTION()
1100 add_assoc_zval_ex(return_value, ZEND_STRS("notification"), context->notifier->ptr); in PHP_FUNCTION()
1101 Z_ADDREF_P(context->notifier->ptr); in PHP_FUNCTION()
1104 ZVAL_ZVAL(options, context->options, 1, 0); in PHP_FUNCTION()
1114 php_stream_context *context; in PHP_FUNCTION() local
1123 context = FG(default_context); in PHP_FUNCTION()
1126 parse_context_options(context, params TSRMLS_CC); in PHP_FUNCTION()
1129 php_stream_context_to_zval(context, return_value); in PHP_FUNCTION()
1138 php_stream_context *context; in PHP_FUNCTION() local
1147 context = FG(default_context); in PHP_FUNCTION()
1149 parse_context_options(context, options TSRMLS_CC); in PHP_FUNCTION()
1151 php_stream_context_to_zval(context, return_value); in PHP_FUNCTION()
1160 php_stream_context *context; in PHP_FUNCTION() local
1166 context = php_stream_context_alloc(); in PHP_FUNCTION()
1169 parse_context_options(context, options TSRMLS_CC); in PHP_FUNCTION()
1173 parse_context_params(context, params TSRMLS_CC); in PHP_FUNCTION()
1176 RETURN_RESOURCE(context->rsrc_id); in PHP_FUNCTION()