Lines Matching refs:context
100 php_stream_context *context = NULL; in PHP_FUNCTION() local
108 context = php_stream_context_from_zval(zcontext, flags & PHP_FILE_NO_DEFAULT_CONTEXT); in PHP_FUNCTION()
135 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 GC_REFCOUNT(context->res)++; in PHP_FUNCTION()
209 NULL, NULL, context, &errstr, &err); in PHP_FUNCTION()
826 static void user_space_stream_notifier(php_stream_context *context, int notifycode, int severity, in user_space_stream_notifier() argument
829 zval *callback = &context->notifier->ptr; in user_space_stream_notifier()
862 static int parse_context_options(php_stream_context *context, zval *options) in parse_context_options() argument
873 php_stream_context_set_option(context, ZSTR_VAL(wkey), ZSTR_VAL(okey), oval); in parse_context_options()
884 static int parse_context_params(php_stream_context *context, zval *params) in parse_context_params() argument
891 if (context->notifier) { in parse_context_params()
892 php_stream_notification_free(context->notifier); in parse_context_params()
893 context->notifier = NULL; in parse_context_params()
896 context->notifier = php_stream_notification_alloc(); in parse_context_params()
897 context->notifier->func = user_space_stream_notifier; in parse_context_params()
898 ZVAL_COPY(&context->notifier->ptr, tmp); in parse_context_params()
899 context->notifier->dtor = user_space_stream_notifier_dtor; in parse_context_params()
903 parse_context_options(context, tmp); in parse_context_params()
917 php_stream_context *context = NULL; in decode_context_param() local
919 context = zend_fetch_resource_ex(contextresource, NULL, php_le_stream_context()); in decode_context_param()
920 if (context == NULL) { in decode_context_param()
926 context = PHP_STREAM_CONTEXT(stream); in decode_context_param()
927 if (context == NULL) { in decode_context_param()
932 context = php_stream_context_alloc(); in decode_context_param()
933 stream->ctx = context->res; in decode_context_param()
938 return context; in decode_context_param()
947 php_stream_context *context; in PHP_FUNCTION() local
953 context = decode_context_param(zcontext); in PHP_FUNCTION()
954 if (!context) { in PHP_FUNCTION()
959 ZVAL_COPY(return_value, &context->options); in PHP_FUNCTION()
968 php_stream_context *context; in PHP_FUNCTION() local
979 if (!(context = decode_context_param(zcontext))) { in PHP_FUNCTION()
984 RETURN_BOOL(parse_context_options(context, options) == SUCCESS); in PHP_FUNCTION()
998 if (!(context = decode_context_param(zcontext))) { in PHP_FUNCTION()
1003 RETURN_BOOL(php_stream_context_set_option(context, wrappername, optionname, zvalue) == SUCCESS); in PHP_FUNCTION()
1013 php_stream_context *context; in PHP_FUNCTION() local
1020 context = decode_context_param(zcontext); in PHP_FUNCTION()
1021 if (!context) { in PHP_FUNCTION()
1026 RETVAL_BOOL(parse_context_params(context, params) == SUCCESS); in PHP_FUNCTION()
1035 php_stream_context *context; in PHP_FUNCTION() local
1041 context = decode_context_param(zcontext); in PHP_FUNCTION()
1042 if (!context) { in PHP_FUNCTION()
1048 …if (context->notifier && Z_TYPE(context->notifier->ptr) != IS_UNDEF && context->notifier->func == … in PHP_FUNCTION()
1049 …add_assoc_zval_ex(return_value, "notification", sizeof("notification")-1, &context->notifier->ptr); in PHP_FUNCTION()
1050 if (Z_REFCOUNTED(context->notifier->ptr)) Z_ADDREF(context->notifier->ptr); in PHP_FUNCTION()
1052 if (Z_REFCOUNTED(context->options)) Z_ADDREF(context->options); in PHP_FUNCTION()
1053 add_assoc_zval_ex(return_value, "options", sizeof("options")-1, &context->options); in PHP_FUNCTION()
1062 php_stream_context *context; in PHP_FUNCTION() local
1071 context = FG(default_context); in PHP_FUNCTION()
1074 parse_context_options(context, params); in PHP_FUNCTION()
1077 php_stream_context_to_zval(context, return_value); in PHP_FUNCTION()
1086 php_stream_context *context; in PHP_FUNCTION() local
1095 context = FG(default_context); in PHP_FUNCTION()
1097 parse_context_options(context, options); in PHP_FUNCTION()
1099 php_stream_context_to_zval(context, return_value); in PHP_FUNCTION()
1108 php_stream_context *context; in PHP_FUNCTION() local
1114 context = php_stream_context_alloc(); in PHP_FUNCTION()
1117 parse_context_options(context, options); in PHP_FUNCTION()
1121 parse_context_params(context, params); in PHP_FUNCTION()
1124 RETURN_RES(context->res); in PHP_FUNCTION()