Lines Matching refs:context

105 	php_stream_context *context = NULL;  in PHP_FUNCTION()  local
119 context = php_stream_context_from_zval(zcontext, flags & PHP_FILE_NO_DEFAULT_CONTEXT); in PHP_FUNCTION()
146 hashkey, &tv, context, &errstr, &err); in PHP_FUNCTION()
195 php_stream_context *context = NULL; in PHP_FUNCTION() local
208 context = php_stream_context_from_zval(zcontext, flags & PHP_FILE_NO_DEFAULT_CONTEXT); in PHP_FUNCTION()
210 if (context) { in PHP_FUNCTION()
211 GC_REFCOUNT(context->res)++; in PHP_FUNCTION()
225 NULL, NULL, context, &errstr, &err); in PHP_FUNCTION()
861 static void user_space_stream_notifier(php_stream_context *context, int notifycode, int severity, in user_space_stream_notifier() argument
864 zval *callback = &context->notifier->ptr; in user_space_stream_notifier()
897 static int parse_context_options(php_stream_context *context, zval *options) in parse_context_options() argument
908 php_stream_context_set_option(context, ZSTR_VAL(wkey), ZSTR_VAL(okey), oval); in parse_context_options()
919 static int parse_context_params(php_stream_context *context, zval *params) in parse_context_params() argument
926 if (context->notifier) { in parse_context_params()
927 php_stream_notification_free(context->notifier); in parse_context_params()
928 context->notifier = NULL; in parse_context_params()
931 context->notifier = php_stream_notification_alloc(); in parse_context_params()
932 context->notifier->func = user_space_stream_notifier; in parse_context_params()
933 ZVAL_COPY(&context->notifier->ptr, tmp); in parse_context_params()
934 context->notifier->dtor = user_space_stream_notifier_dtor; in parse_context_params()
938 parse_context_options(context, tmp); in parse_context_params()
952 php_stream_context *context = NULL; in decode_context_param() local
954 context = zend_fetch_resource_ex(contextresource, NULL, php_le_stream_context()); in decode_context_param()
955 if (context == NULL) { in decode_context_param()
961 context = PHP_STREAM_CONTEXT(stream); in decode_context_param()
962 if (context == NULL) { in decode_context_param()
967 context = php_stream_context_alloc(); in decode_context_param()
968 stream->ctx = context->res; in decode_context_param()
973 return context; in decode_context_param()
982 php_stream_context *context; in PHP_FUNCTION() local
988 context = decode_context_param(zcontext); in PHP_FUNCTION()
989 if (!context) { in PHP_FUNCTION()
994 ZVAL_COPY(return_value, &context->options); in PHP_FUNCTION()
1003 php_stream_context *context; in PHP_FUNCTION() local
1014 if (!(context = decode_context_param(zcontext))) { in PHP_FUNCTION()
1019 RETURN_BOOL(parse_context_options(context, options) == SUCCESS); in PHP_FUNCTION()
1033 if (!(context = decode_context_param(zcontext))) { in PHP_FUNCTION()
1038 RETURN_BOOL(php_stream_context_set_option(context, wrappername, optionname, zvalue) == SUCCESS); in PHP_FUNCTION()
1048 php_stream_context *context; in PHP_FUNCTION() local
1055 context = decode_context_param(zcontext); in PHP_FUNCTION()
1056 if (!context) { in PHP_FUNCTION()
1061 RETVAL_BOOL(parse_context_params(context, params) == SUCCESS); in PHP_FUNCTION()
1070 php_stream_context *context; in PHP_FUNCTION() local
1076 context = decode_context_param(zcontext); in PHP_FUNCTION()
1077 if (!context) { in PHP_FUNCTION()
1083 …if (context->notifier && Z_TYPE(context->notifier->ptr) != IS_UNDEF && context->notifier->func == … in PHP_FUNCTION()
1084 …add_assoc_zval_ex(return_value, "notification", sizeof("notification")-1, &context->notifier->ptr); in PHP_FUNCTION()
1085 if (Z_REFCOUNTED(context->notifier->ptr)) Z_ADDREF(context->notifier->ptr); in PHP_FUNCTION()
1087 if (Z_REFCOUNTED(context->options)) Z_ADDREF(context->options); in PHP_FUNCTION()
1088 add_assoc_zval_ex(return_value, "options", sizeof("options")-1, &context->options); in PHP_FUNCTION()
1097 php_stream_context *context; in PHP_FUNCTION() local
1107 context = FG(default_context); in PHP_FUNCTION()
1110 parse_context_options(context, params); in PHP_FUNCTION()
1113 php_stream_context_to_zval(context, return_value); in PHP_FUNCTION()
1122 php_stream_context *context; in PHP_FUNCTION() local
1131 context = FG(default_context); in PHP_FUNCTION()
1133 parse_context_options(context, options); in PHP_FUNCTION()
1135 php_stream_context_to_zval(context, return_value); in PHP_FUNCTION()
1144 php_stream_context *context; in PHP_FUNCTION() local
1152 context = php_stream_context_alloc(); in PHP_FUNCTION()
1155 parse_context_options(context, options); in PHP_FUNCTION()
1159 parse_context_params(context, params); in PHP_FUNCTION()
1162 RETURN_RES(context->res); in PHP_FUNCTION()