Lines Matching refs:context
103 php_stream_context *context = NULL; in PHP_FUNCTION() local
117 context = php_stream_context_from_zval(zcontext, flags & PHP_FILE_NO_DEFAULT_CONTEXT); in PHP_FUNCTION()
144 hashkey, &tv, context, &errstr, &err); in PHP_FUNCTION()
193 php_stream_context *context = NULL; in PHP_FUNCTION() local
206 context = php_stream_context_from_zval(zcontext, flags & PHP_FILE_NO_DEFAULT_CONTEXT); in PHP_FUNCTION()
208 if (context) { in PHP_FUNCTION()
209 GC_ADDREF(context->res); in PHP_FUNCTION()
223 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 = &context->notifier->ptr; in user_space_stream_notifier()
903 static int parse_context_options(php_stream_context *context, zval *options) in parse_context_options() argument
914 php_stream_context_set_option(context, ZSTR_VAL(wkey), ZSTR_VAL(okey), oval); in parse_context_options()
925 static int parse_context_params(php_stream_context *context, zval *params) in parse_context_params() argument
932 if (context->notifier) { in parse_context_params()
933 php_stream_notification_free(context->notifier); in parse_context_params()
934 context->notifier = NULL; in parse_context_params()
937 context->notifier = php_stream_notification_alloc(); in parse_context_params()
938 context->notifier->func = user_space_stream_notifier; in parse_context_params()
939 ZVAL_COPY(&context->notifier->ptr, tmp); in parse_context_params()
940 context->notifier->dtor = user_space_stream_notifier_dtor; in parse_context_params()
944 parse_context_options(context, tmp); in parse_context_params()
958 php_stream_context *context = NULL; in decode_context_param() local
960 context = zend_fetch_resource_ex(contextresource, NULL, php_le_stream_context()); in decode_context_param()
961 if (context == NULL) { in decode_context_param()
967 context = PHP_STREAM_CONTEXT(stream); in decode_context_param()
968 if (context == NULL) { in decode_context_param()
973 context = php_stream_context_alloc(); in decode_context_param()
974 stream->ctx = context->res; in decode_context_param()
979 return context; in decode_context_param()
988 php_stream_context *context; in PHP_FUNCTION() local
994 context = decode_context_param(zcontext); in PHP_FUNCTION()
995 if (!context) { in PHP_FUNCTION()
1000 ZVAL_COPY(return_value, &context->options); in PHP_FUNCTION()
1009 php_stream_context *context; in PHP_FUNCTION() local
1020 if (!(context = decode_context_param(zcontext))) { in PHP_FUNCTION()
1025 RETURN_BOOL(parse_context_options(context, options) == SUCCESS); in PHP_FUNCTION()
1039 if (!(context = decode_context_param(zcontext))) { in PHP_FUNCTION()
1044 RETURN_BOOL(php_stream_context_set_option(context, wrappername, optionname, zvalue) == SUCCESS); in PHP_FUNCTION()
1054 php_stream_context *context; in PHP_FUNCTION() local
1061 context = decode_context_param(zcontext); in PHP_FUNCTION()
1062 if (!context) { in PHP_FUNCTION()
1067 RETVAL_BOOL(parse_context_params(context, params) == SUCCESS); in PHP_FUNCTION()
1076 php_stream_context *context; in PHP_FUNCTION() local
1082 context = decode_context_param(zcontext); in PHP_FUNCTION()
1083 if (!context) { in PHP_FUNCTION()
1089 …if (context->notifier && Z_TYPE(context->notifier->ptr) != IS_UNDEF && context->notifier->func == … in PHP_FUNCTION()
1090 Z_TRY_ADDREF(context->notifier->ptr); in PHP_FUNCTION()
1091 …add_assoc_zval_ex(return_value, "notification", sizeof("notification")-1, &context->notifier->ptr); in PHP_FUNCTION()
1093 Z_TRY_ADDREF(context->options); in PHP_FUNCTION()
1094 add_assoc_zval_ex(return_value, "options", sizeof("options")-1, &context->options); in PHP_FUNCTION()
1103 php_stream_context *context; in PHP_FUNCTION() local
1113 context = FG(default_context); in PHP_FUNCTION()
1116 parse_context_options(context, params); in PHP_FUNCTION()
1119 php_stream_context_to_zval(context, return_value); in PHP_FUNCTION()
1128 php_stream_context *context; in PHP_FUNCTION() local
1137 context = FG(default_context); in PHP_FUNCTION()
1139 parse_context_options(context, options); in PHP_FUNCTION()
1141 php_stream_context_to_zval(context, return_value); in PHP_FUNCTION()
1150 php_stream_context *context; in PHP_FUNCTION() local
1158 context = php_stream_context_alloc(); in PHP_FUNCTION()
1161 parse_context_options(context, options); in PHP_FUNCTION()
1165 parse_context_params(context, params); in PHP_FUNCTION()
1168 RETURN_RES(context->res); in PHP_FUNCTION()