diff --git a/reference/curl/functions/curl-setopt.xml b/reference/curl/functions/curl-setopt.xml index 6974baa8cf..b8c187a699 100644 --- a/reference/curl/functions/curl-setopt.xml +++ b/reference/curl/functions/curl-setopt.xml @@ -1264,9 +1264,8 @@ - value should be a string that is the name of a valid - callback function for the following values of the - option parameter: + value should be the name of a valid function or a Closure + for the following values of the option parameter: @@ -1279,18 +1278,18 @@ CURLOPT_HEADERFUNCTION - The name of a callback function where the callback function takes - two parameters. The first is the cURL resource, the second is a + A callback accepting two parameters. + The first is the cURL resource, the second is a string with the header data to be written. The header data must - be written when using this callback function. Return the number of + be written when by this callback. Return the number of bytes written. CURLOPT_PASSWDFUNCTION - The name of a callback function where the callback function takes - three parameters. The first is the cURL resource, the second is a + A callback accepting three parameters. + The first is the cURL resource, the second is a string containing a password prompt, and the third is the maximum password length. Return the string containing the password. @@ -1298,8 +1297,8 @@ CURLOPT_PROGRESSFUNCTION - The name of a callback function where the callback function takes - three parameters. The first is the cURL resource, the second is a + A callback accepting three parameters. + The first is the cURL resource, the second is a file-descriptor resource, and the third is length. Return the string containing the data. @@ -1307,11 +1306,11 @@ CURLOPT_READFUNCTION - The name of a callback function where the callback function takes - three parameters. The first is the cURL resource, the second is a + A callback accepting three parameters. + The first is the cURL resource, the second is a stream resource provided to cURL through the option CURLOPT_INFILE, and the third is the maximum - amount of data to be read. The callback function must return a string + amount of data to be read. The callback must return a string with a length equal or smaller than the amount of data requested, typically by reading it from the passed stream resource. It should return an empty string to signal EOF. @@ -1320,10 +1319,10 @@ CURLOPT_WRITEFUNCTION - The name of a callback function where the callback function takes - two parameters. The first is the cURL resource, and the second is a - string with the data to be written. The data must be saved by using - this callback function. It must return the exact number of bytes written + A callback accepting two parameters. + The first is the cURL resource, and the second is a + string with the data to be written. The data must be saved by + this callback. It must return the exact number of bytes written or the transfer will be aborted with an error.