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()
878 static void user_space_stream_notifier(php_stream_context *context, int notifycode, int severity, in user_space_stream_notifier() argument
881 zval *callback = (zval*)context->notifier->ptr; in user_space_stream_notifier()
925 static int parse_context_options(php_stream_context *context, zval *options TSRMLS_DC) in parse_context_options() argument
943 php_stream_context_set_option(context, wkey, okey, *oval); in parse_context_options()
957 static int parse_context_params(php_stream_context *context, zval *params TSRMLS_DC) in parse_context_params() argument
964 if (context->notifier) { in parse_context_params()
965 php_stream_notification_free(context->notifier); in parse_context_params()
966 context->notifier = NULL; in parse_context_params()
969 context->notifier = php_stream_notification_alloc(); in parse_context_params()
970 context->notifier->func = user_space_stream_notifier; in parse_context_params()
971 context->notifier->ptr = *tmp; in parse_context_params()
973 context->notifier->dtor = user_space_stream_notifier_dtor; in parse_context_params()
977 parse_context_options(context, *tmp TSRMLS_CC); in parse_context_params()
991 php_stream_context *context = NULL; in decode_context_param() local
993 …context = zend_fetch_resource(&contextresource TSRMLS_CC, -1, NULL, NULL, 1, php_le_stream_context… in decode_context_param()
994 if (context == NULL) { in decode_context_param()
1000 context = stream->context; in decode_context_param()
1001 if (context == NULL) { in decode_context_param()
1006 context = stream->context = php_stream_context_alloc(TSRMLS_C); in decode_context_param()
1011 return context; in decode_context_param()
1020 php_stream_context *context; in PHP_FUNCTION() local
1025 context = decode_context_param(zcontext TSRMLS_CC); in PHP_FUNCTION()
1026 if (!context) { in PHP_FUNCTION()
1031 RETURN_ZVAL(context->options, 1, 0); in PHP_FUNCTION()
1040 php_stream_context *context; in PHP_FUNCTION() local
1055 context = decode_context_param(zcontext TSRMLS_CC); in PHP_FUNCTION()
1056 if (!context) { in PHP_FUNCTION()
1063 RETVAL_BOOL(parse_context_options(context, options TSRMLS_CC) == SUCCESS); in PHP_FUNCTION()
1065 php_stream_context_set_option(context, wrappername, optionname, zvalue); in PHP_FUNCTION()
1076 php_stream_context *context; in PHP_FUNCTION() local
1082 context = decode_context_param(zcontext TSRMLS_CC); in PHP_FUNCTION()
1083 if (!context) { in PHP_FUNCTION()
1088 RETVAL_BOOL(parse_context_params(context, params TSRMLS_CC) == SUCCESS); in PHP_FUNCTION()
1097 php_stream_context *context; in PHP_FUNCTION() local
1103 context = decode_context_param(zcontext TSRMLS_CC); in PHP_FUNCTION()
1104 if (!context) { in PHP_FUNCTION()
1110 …if (context->notifier && context->notifier->ptr && context->notifier->func == user_space_stream_no… in PHP_FUNCTION()
1111 add_assoc_zval_ex(return_value, ZEND_STRS("notification"), context->notifier->ptr); in PHP_FUNCTION()
1112 Z_ADDREF_P(context->notifier->ptr); in PHP_FUNCTION()
1115 ZVAL_ZVAL(options, context->options, 1, 0); in PHP_FUNCTION()
1125 php_stream_context *context; in PHP_FUNCTION() local
1134 context = FG(default_context); in PHP_FUNCTION()
1137 parse_context_options(context, params TSRMLS_CC); in PHP_FUNCTION()
1140 php_stream_context_to_zval(context, return_value); in PHP_FUNCTION()
1149 php_stream_context *context; in PHP_FUNCTION() local
1158 context = FG(default_context); in PHP_FUNCTION()
1160 parse_context_options(context, options TSRMLS_CC); in PHP_FUNCTION()
1162 php_stream_context_to_zval(context, return_value); in PHP_FUNCTION()
1171 php_stream_context *context; in PHP_FUNCTION() local
1177 context = php_stream_context_alloc(TSRMLS_C); in PHP_FUNCTION()
1180 parse_context_options(context, options TSRMLS_CC); in PHP_FUNCTION()
1184 parse_context_params(context, params TSRMLS_CC); in PHP_FUNCTION()
1187 RETURN_RESOURCE(context->rsrc_id); in PHP_FUNCTION()