Skip to content
Snippets Groups Projects
Commit 7f936eaa authored by Stanley Cheung's avatar Stanley Cheung Committed by GitHub
Browse files

Merge pull request #7748 from thinkerou/update_function_desc

PHP: update param description of function
parents 93b09478 efbc9e7b
No related branches found
No related tags found
No related merge requests found
...@@ -69,8 +69,8 @@ PHP_GRPC_FREE_WRAPPED_FUNC_START(wrapped_grpc_call) ...@@ -69,8 +69,8 @@ PHP_GRPC_FREE_WRAPPED_FUNC_START(wrapped_grpc_call)
} }
PHP_GRPC_FREE_WRAPPED_FUNC_END() PHP_GRPC_FREE_WRAPPED_FUNC_END()
/* Initializes an instance of wrapped_grpc_call to be associated with an object /* Initializes an instance of wrapped_grpc_call to be associated with an
* of a class specified by class_type */ * object of a class specified by class_type */
php_grpc_zend_object create_wrapped_grpc_call(zend_class_entry *class_type php_grpc_zend_object create_wrapped_grpc_call(zend_class_entry *class_type
TSRMLS_DC) { TSRMLS_DC) {
PHP_GRPC_ALLOC_CLASS_OBJECT(wrapped_grpc_call); PHP_GRPC_ALLOC_CLASS_OBJECT(wrapped_grpc_call);
...@@ -195,10 +195,11 @@ zval *grpc_php_wrap_call(grpc_call *wrapped, bool owned TSRMLS_DC) { ...@@ -195,10 +195,11 @@ zval *grpc_php_wrap_call(grpc_call *wrapped, bool owned TSRMLS_DC) {
/** /**
* Constructs a new instance of the Call class. * Constructs a new instance of the Call class.
* @param Channel $channel The channel to associate the call with. Must not be * @param Channel $channel_obj The channel to associate the call with.
* closed. * Must not be closed.
* @param string $method The method to call * @param string $method The method to call
* @param Timeval $absolute_deadline The deadline for completing the call * @param Timeval $deadline_obj The deadline for completing the call
* @param string $host_override The host is set by user (optional)
*/ */
PHP_METHOD(Call, __construct) { PHP_METHOD(Call, __construct) {
zval *channel_obj; zval *channel_obj;
...@@ -237,7 +238,7 @@ PHP_METHOD(Call, __construct) { ...@@ -237,7 +238,7 @@ PHP_METHOD(Call, __construct) {
/** /**
* Start a batch of RPC actions. * Start a batch of RPC actions.
* @param array batch Array of actions to take * @param array $array Array of actions to take
* @return object Object with results of all actions * @return object Object with results of all actions
*/ */
PHP_METHOD(Call, startBatch) { PHP_METHOD(Call, startBatch) {
...@@ -515,8 +516,9 @@ PHP_METHOD(Call, getPeer) { ...@@ -515,8 +516,9 @@ PHP_METHOD(Call, getPeer) {
} }
/** /**
* Cancel the call. This will cause the call to end with STATUS_CANCELLED if it * Cancel the call. This will cause the call to end with STATUS_CANCELLED
* has not already ended with another status. * if it has not already ended with another status.
* @return void
*/ */
PHP_METHOD(Call, cancel) { PHP_METHOD(Call, cancel) {
wrapped_grpc_call *call = Z_WRAPPED_GRPC_CALL_P(getThis()); wrapped_grpc_call *call = Z_WRAPPED_GRPC_CALL_P(getThis());
...@@ -525,8 +527,8 @@ PHP_METHOD(Call, cancel) { ...@@ -525,8 +527,8 @@ PHP_METHOD(Call, cancel) {
/** /**
* Set the CallCredentials for this call. * Set the CallCredentials for this call.
* @param CallCredentials creds_obj The CallCredentials object * @param CallCredentials $creds_obj The CallCredentials object
* @param int The error code * @return int The error code
*/ */
PHP_METHOD(Call, setCredentials) { PHP_METHOD(Call, setCredentials) {
zval *creds_obj; zval *creds_obj;
......
...@@ -87,8 +87,8 @@ zval *grpc_php_wrap_call_credentials(grpc_call_credentials ...@@ -87,8 +87,8 @@ zval *grpc_php_wrap_call_credentials(grpc_call_credentials
/** /**
* Create composite credentials from two existing credentials. * Create composite credentials from two existing credentials.
* @param CallCredentials cred1 The first credential * @param CallCredentials $cred1_obj The first credential
* @param CallCredentials cred2 The second credential * @param CallCredentials $cred2_obj The second credential
* @return CallCredentials The new composite credentials object * @return CallCredentials The new composite credentials object
*/ */
PHP_METHOD(CallCredentials, createComposite) { PHP_METHOD(CallCredentials, createComposite) {
...@@ -119,7 +119,7 @@ PHP_METHOD(CallCredentials, createComposite) { ...@@ -119,7 +119,7 @@ PHP_METHOD(CallCredentials, createComposite) {
/** /**
* Create a call credentials object from the plugin API * Create a call credentials object from the plugin API
* @param function callback The callback function * @param function $fci The callback function
* @return CallCredentials The new call credentials object * @return CallCredentials The new call credentials object
*/ */
PHP_METHOD(CallCredentials, createFromPlugin) { PHP_METHOD(CallCredentials, createFromPlugin) {
......
...@@ -125,7 +125,7 @@ void php_grpc_read_args_array(zval *args_array, ...@@ -125,7 +125,7 @@ void php_grpc_read_args_array(zval *args_array,
* "credentials" key mapping to a ChannelCredentials object, a secure channel * "credentials" key mapping to a ChannelCredentials object, a secure channel
* will be created with those credentials. * will be created with those credentials.
* @param string $target The hostname to associate with this channel * @param string $target The hostname to associate with this channel
* @param array $args The arguments to pass to the Channel (optional) * @param array $args_array The arguments to pass to the Channel
*/ */
PHP_METHOD(Channel, __construct) { PHP_METHOD(Channel, __construct) {
wrapped_grpc_channel *channel = Z_WRAPPED_GRPC_CHANNEL_P(getThis()); wrapped_grpc_channel *channel = Z_WRAPPED_GRPC_CHANNEL_P(getThis());
...@@ -182,7 +182,7 @@ PHP_METHOD(Channel, getTarget) { ...@@ -182,7 +182,7 @@ PHP_METHOD(Channel, getTarget) {
/** /**
* Get the connectivity state of the channel * Get the connectivity state of the channel
* @param bool (optional) try to connect on the channel * @param bool $try_to_connect Try to connect on the channel (optional)
* @return long The grpc connectivity state * @return long The grpc connectivity state
*/ */
PHP_METHOD(Channel, getConnectivityState) { PHP_METHOD(Channel, getConnectivityState) {
...@@ -202,8 +202,8 @@ PHP_METHOD(Channel, getConnectivityState) { ...@@ -202,8 +202,8 @@ PHP_METHOD(Channel, getConnectivityState) {
/** /**
* Watch the connectivity state of the channel until it changed * Watch the connectivity state of the channel until it changed
* @param long The previous connectivity state of the channel * @param long $last_state The previous connectivity state of the channel
* @param Timeval The deadline this function should wait until * @param Timeval $deadline_obj The deadline this function should wait until
* @return bool If the connectivity state changes from last_state * @return bool If the connectivity state changes from last_state
* before deadline * before deadline
*/ */
...@@ -233,6 +233,7 @@ PHP_METHOD(Channel, watchConnectivityState) { ...@@ -233,6 +233,7 @@ PHP_METHOD(Channel, watchConnectivityState) {
/** /**
* Close the channel * Close the channel
* @return void
*/ */
PHP_METHOD(Channel, close) { PHP_METHOD(Channel, close) {
wrapped_grpc_channel *channel = Z_WRAPPED_GRPC_CHANNEL_P(getThis()); wrapped_grpc_channel *channel = Z_WRAPPED_GRPC_CHANNEL_P(getThis());
......
...@@ -97,7 +97,7 @@ zval *grpc_php_wrap_channel_credentials(grpc_channel_credentials ...@@ -97,7 +97,7 @@ zval *grpc_php_wrap_channel_credentials(grpc_channel_credentials
/** /**
* Set default roots pem. * Set default roots pem.
* @param string pem_roots PEM encoding of the server root certificates * @param string $pem_roots PEM encoding of the server root certificates
* @return void * @return void
*/ */
PHP_METHOD(ChannelCredentials, setDefaultRootsPem) { PHP_METHOD(ChannelCredentials, setDefaultRootsPem) {
...@@ -129,11 +129,11 @@ PHP_METHOD(ChannelCredentials, createDefault) { ...@@ -129,11 +129,11 @@ PHP_METHOD(ChannelCredentials, createDefault) {
/** /**
* Create SSL credentials. * Create SSL credentials.
* @param string pem_root_certs PEM encoding of the server root certificates * @param string $pem_root_certs PEM encoding of the server root certificates
* @param string pem_private_key PEM encoding of the client's private key * @param string $pem_key_cert_pair.private_key PEM encoding of the client's
* (optional) * private key (optional)
* @param string pem_cert_chain PEM encoding of the client's certificate chain * @param string $pem_key_cert_pair.cert_chain PEM encoding of the client's
* (optional) * certificate chain (optional)
* @return ChannelCredentials The new SSL credentials object * @return ChannelCredentials The new SSL credentials object
*/ */
PHP_METHOD(ChannelCredentials, createSsl) { PHP_METHOD(ChannelCredentials, createSsl) {
...@@ -168,8 +168,8 @@ PHP_METHOD(ChannelCredentials, createSsl) { ...@@ -168,8 +168,8 @@ PHP_METHOD(ChannelCredentials, createSsl) {
/** /**
* Create composite credentials from two existing credentials. * Create composite credentials from two existing credentials.
* @param ChannelCredentials cred1 The first credential * @param ChannelCredentials $cred1_obj The first credential
* @param CallCredentials cred2 The second credential * @param CallCredentials $cred2_obj The second credential
* @return ChannelCredentials The new composite credentials object * @return ChannelCredentials The new composite credentials object
*/ */
PHP_METHOD(ChannelCredentials, createComposite) { PHP_METHOD(ChannelCredentials, createComposite) {
......
...@@ -72,8 +72,8 @@ PHP_GRPC_FREE_WRAPPED_FUNC_START(wrapped_grpc_server) ...@@ -72,8 +72,8 @@ PHP_GRPC_FREE_WRAPPED_FUNC_START(wrapped_grpc_server)
} }
PHP_GRPC_FREE_WRAPPED_FUNC_END() PHP_GRPC_FREE_WRAPPED_FUNC_END()
/* Initializes an instance of wrapped_grpc_call to be associated with an object /* Initializes an instance of wrapped_grpc_call to be associated with an
* of a class specified by class_type */ * object of a class specified by class_type */
php_grpc_zend_object create_wrapped_grpc_server(zend_class_entry *class_type php_grpc_zend_object create_wrapped_grpc_server(zend_class_entry *class_type
TSRMLS_DC) { TSRMLS_DC) {
PHP_GRPC_ALLOC_CLASS_OBJECT(wrapped_grpc_server); PHP_GRPC_ALLOC_CLASS_OBJECT(wrapped_grpc_server);
...@@ -84,7 +84,7 @@ php_grpc_zend_object create_wrapped_grpc_server(zend_class_entry *class_type ...@@ -84,7 +84,7 @@ php_grpc_zend_object create_wrapped_grpc_server(zend_class_entry *class_type
/** /**
* Constructs a new instance of the Server class * Constructs a new instance of the Server class
* @param array $args The arguments to pass to the server (optional) * @param array $args_array The arguments to pass to the server (optional)
*/ */
PHP_METHOD(Server, __construct) { PHP_METHOD(Server, __construct) {
wrapped_grpc_server *server = Z_WRAPPED_GRPC_SERVER_P(getThis()); wrapped_grpc_server *server = Z_WRAPPED_GRPC_SERVER_P(getThis());
...@@ -116,7 +116,7 @@ PHP_METHOD(Server, __construct) { ...@@ -116,7 +116,7 @@ PHP_METHOD(Server, __construct) {
* Request a call on a server. Creates a single GRPC_SERVER_RPC_NEW event. * Request a call on a server. Creates a single GRPC_SERVER_RPC_NEW event.
* @param long $tag_new The tag to associate with the new request * @param long $tag_new The tag to associate with the new request
* @param long $tag_cancel The tag to use if the call is cancelled * @param long $tag_cancel The tag to use if the call is cancelled
* @return Void * @return void
*/ */
PHP_METHOD(Server, requestCall) { PHP_METHOD(Server, requestCall) {
grpc_call_error error_code; grpc_call_error error_code;
...@@ -180,7 +180,7 @@ PHP_METHOD(Server, requestCall) { ...@@ -180,7 +180,7 @@ PHP_METHOD(Server, requestCall) {
/** /**
* Add a http2 over tcp listener. * Add a http2 over tcp listener.
* @param string $addr The address to add * @param string $addr The address to add
* @return true on success, false on failure * @return bool True on success, false on failure
*/ */
PHP_METHOD(Server, addHttp2Port) { PHP_METHOD(Server, addHttp2Port) {
const char *addr; const char *addr;
...@@ -197,6 +197,12 @@ PHP_METHOD(Server, addHttp2Port) { ...@@ -197,6 +197,12 @@ PHP_METHOD(Server, addHttp2Port) {
RETURN_LONG(grpc_server_add_insecure_http2_port(server->wrapped, addr)); RETURN_LONG(grpc_server_add_insecure_http2_port(server->wrapped, addr));
} }
/**
* Add a secure http2 over tcp listener.
* @param string $addr The address to add
* @param ServerCredentials The ServerCredentials object
* @return bool True on success, false on failure
*/
PHP_METHOD(Server, addSecureHttp2Port) { PHP_METHOD(Server, addSecureHttp2Port) {
const char *addr; const char *addr;
php_grpc_int addr_len; php_grpc_int addr_len;
...@@ -220,7 +226,7 @@ PHP_METHOD(Server, addSecureHttp2Port) { ...@@ -220,7 +226,7 @@ PHP_METHOD(Server, addSecureHttp2Port) {
/** /**
* Start a server - tells all listeners to start listening * Start a server - tells all listeners to start listening
* @return Void * @return void
*/ */
PHP_METHOD(Server, start) { PHP_METHOD(Server, start) {
wrapped_grpc_server *server = Z_WRAPPED_GRPC_SERVER_P(getThis()); wrapped_grpc_server *server = Z_WRAPPED_GRPC_SERVER_P(getThis());
......
...@@ -61,8 +61,8 @@ PHP_GRPC_FREE_WRAPPED_FUNC_START(wrapped_grpc_server_credentials) ...@@ -61,8 +61,8 @@ PHP_GRPC_FREE_WRAPPED_FUNC_START(wrapped_grpc_server_credentials)
} }
PHP_GRPC_FREE_WRAPPED_FUNC_END() PHP_GRPC_FREE_WRAPPED_FUNC_END()
/* Initializes an instace of wrapped_grpc_server_credentials to be associated /* Initializes an instace of wrapped_grpc_server_credentials to be
* with an object of a class specified by class_type */ * associated with an object of a class specified by class_type */
php_grpc_zend_object create_wrapped_grpc_server_credentials( php_grpc_zend_object create_wrapped_grpc_server_credentials(
zend_class_entry *class_type TSRMLS_DC) { zend_class_entry *class_type TSRMLS_DC) {
PHP_GRPC_ALLOC_CLASS_OBJECT(wrapped_grpc_server_credentials); PHP_GRPC_ALLOC_CLASS_OBJECT(wrapped_grpc_server_credentials);
......
...@@ -80,7 +80,7 @@ zval *grpc_php_wrap_timeval(gpr_timespec wrapped TSRMLS_DC) { ...@@ -80,7 +80,7 @@ zval *grpc_php_wrap_timeval(gpr_timespec wrapped TSRMLS_DC) {
/** /**
* Constructs a new instance of the Timeval class * Constructs a new instance of the Timeval class
* @param long $usec The number of microseconds in the interval * @param long $microseconds The number of microseconds in the interval
*/ */
PHP_METHOD(Timeval, __construct) { PHP_METHOD(Timeval, __construct) {
wrapped_grpc_timeval *timeval = Z_WRAPPED_GRPC_TIMEVAL_P(getThis()); wrapped_grpc_timeval *timeval = Z_WRAPPED_GRPC_TIMEVAL_P(getThis());
...@@ -100,7 +100,7 @@ PHP_METHOD(Timeval, __construct) { ...@@ -100,7 +100,7 @@ PHP_METHOD(Timeval, __construct) {
/** /**
* Adds another Timeval to this one and returns the sum. Calculations saturate * Adds another Timeval to this one and returns the sum. Calculations saturate
* at infinities. * at infinities.
* @param Timeval $other The other Timeval object to add * @param Timeval $other_obj The other Timeval object to add
* @return Timeval A new Timeval object containing the sum * @return Timeval A new Timeval object containing the sum
*/ */
PHP_METHOD(Timeval, add) { PHP_METHOD(Timeval, add) {
...@@ -126,8 +126,8 @@ PHP_METHOD(Timeval, add) { ...@@ -126,8 +126,8 @@ PHP_METHOD(Timeval, add) {
/** /**
* Subtracts another Timeval from this one and returns the difference. * Subtracts another Timeval from this one and returns the difference.
* Calculations saturate at infinities. * Calculations saturate at infinities.
* @param Timeval $other The other Timeval object to subtract * @param Timeval $other_obj The other Timeval object to subtract
* @param Timeval A new Timeval object containing the sum * @return Timeval A new Timeval object containing the diff
*/ */
PHP_METHOD(Timeval, subtract) { PHP_METHOD(Timeval, subtract) {
zval *other_obj; zval *other_obj;
...@@ -150,10 +150,10 @@ PHP_METHOD(Timeval, subtract) { ...@@ -150,10 +150,10 @@ PHP_METHOD(Timeval, subtract) {
} }
/** /**
* Return negative, 0, or positive according to whether a < b, a == b, or a > b * Return negative, 0, or positive according to whether a < b, a == b,
* respectively. * or a > b respectively.
* @param Timeval $a The first time to compare * @param Timeval $a_obj The first time to compare
* @param Timeval $b The second time to compare * @param Timeval $b_obj The second time to compare
* @return long * @return long
*/ */
PHP_METHOD(Timeval, compare) { PHP_METHOD(Timeval, compare) {
...@@ -176,9 +176,9 @@ PHP_METHOD(Timeval, compare) { ...@@ -176,9 +176,9 @@ PHP_METHOD(Timeval, compare) {
/** /**
* Checks whether the two times are within $threshold of each other * Checks whether the two times are within $threshold of each other
* @param Timeval $a The first time to compare * @param Timeval $a_obj The first time to compare
* @param Timeval $b The second time to compare * @param Timeval $b_obj The second time to compare
* @param Timeval $threshold The threshold to check against * @param Timeval $thresh_obj The threshold to check against
* @return bool True if $a and $b are within $threshold, False otherwise * @return bool True if $a and $b are within $threshold, False otherwise
*/ */
PHP_METHOD(Timeval, similar) { PHP_METHOD(Timeval, similar) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment