Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions ext/soap/soap.c
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,7 @@ PHP_METHOD(SoapClient, __doRequest);
PHP_METHOD(SoapClient, __setCookie);
PHP_METHOD(SoapClient, __getCookies);
PHP_METHOD(SoapClient, __setLocation);
PHP_METHOD(SoapClient, __getLocation);
PHP_METHOD(SoapClient, __setSoapHeaders);

/* SoapVar Functions */
Expand Down Expand Up @@ -381,6 +382,10 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_soapclient___setlocation, 0, 0, 0)
ZEND_ARG_INFO(0, new_location)
ZEND_END_ARG_INFO()


ZEND_BEGIN_ARG_INFO_EX(arginfo_soapclient___getlocation, 0, 0, 0)
ZEND_END_ARG_INFO()

ZEND_BEGIN_ARG_INFO_EX(arginfo_soap_use_soap_error_handler, 0, 0, 0)
ZEND_ARG_INFO(0, handler)
ZEND_END_ARG_INFO()
Expand Down Expand Up @@ -429,6 +434,7 @@ static const zend_function_entry soap_client_functions[] = {
PHP_ME(SoapClient, __setCookie, arginfo_soapclient___setcookie, 0)
PHP_ME(SoapClient, __getCookies, arginfo_soapclient___getcookies, 0)
PHP_ME(SoapClient, __setLocation, arginfo_soapclient___setlocation, 0)
PHP_ME(SoapClient, __getLocation, arginfo_soapclient___getlocation, 0)
PHP_ME(SoapClient, __setSoapHeaders, arginfo_soapclient___setsoapheaders, 0)
PHP_FE_END
};
Expand Down Expand Up @@ -3255,6 +3261,22 @@ PHP_METHOD(SoapClient, __setLocation)
}
/* }}} */

/* {{{ proto string SoapClient::__getLocation()
Gets the location option (the endpoint URL that will be touched by the
following SOAP requests).
*/
PHP_METHOD(SoapClient, __getLocation)
{
zval *location;

if ((location = zend_hash_str_find(Z_OBJPROP_P(getThis()), "location", sizeof("location")-1)) != NULL && Z_TYPE_P(location) == IS_STRING) {
RETVAL_STR_COPY(Z_STR_P(location));
} else {
RETVAL_NULL();
}
}
/* }}} */

static void clear_soap_fault(zval *obj)
{
if (obj != NULL && Z_TYPE_P(obj) == IS_OBJECT) {
Expand Down