addNotification example

throw new \RuntimeException("SSL certificate not found: {$value}");
        }

        $options['ssl']['local_cert'] = $value;
    }

    /** * @param mixed $value as passed via Request transfer options. */
    private function add_progress(RequestInterface $request, array &$options$value, array &$params): void
    {
        self::addNotification(
            $params,
            static function D$code$a$b$c$transferred$total) use ($value) {
                if ($code == \STREAM_NOTIFY_PROGRESS) {
                    // The upload progress cannot be determined. Use 0 for cURL compatibility:                     // https://curl.se/libcurl/c/CURLOPT_PROGRESSFUNCTION.html                     $value($total$transferred, 0, 0);
                }
            }
        );
    }

    
Home | Imprint | This part of the site doesn't use cookies.