hello
Server : Apache System : Linux webm006.cluster103.gra.hosting.ovh.net 6.18.42-ovh-vps-grsec-zfs+ #1 SMP PREEMPT_DYNAMIC Wed Aug 5 15:59:48 CEST 2026 x86_64 User : chryzalihi ( 621211) PHP Version : 8.3.31 Disable Function : _dyuweyrj4,_dyuweyrj4r,dl Directory : /home/c/h/r/chryzalihi/www/wp-content/languages/themes/the/ |
www/wp-contentOLD/plugins/backwpup/vendor/Guzzle/Plugin/Cache/CallbackCanCacheStrategy.php 0000604 00000003203 15244740702 0030654 0 ustar 00 home/chryzalihi <?php
namespace Guzzle\Plugin\Cache;
use Guzzle\Common\Exception\InvalidArgumentException;
use Guzzle\Http\Message\RequestInterface;
use Guzzle\Http\Message\Response;
/**
* Determines if a request can be cached using a callback
*/
class CallbackCanCacheStrategy extends DefaultCanCacheStrategy
{
/** @var callable Callback for request */
protected $requestCallback;
/** @var callable Callback for response */
protected $responseCallback;
/**
* @param \Closure|array|mixed $requestCallback Callable method to invoke for requests
* @param \Closure|array|mixed $responseCallback Callable method to invoke for responses
*
* @throws InvalidArgumentException
*/
public function __construct($requestCallback = null, $responseCallback = null)
{
if ($requestCallback && !is_callable($requestCallback)) {
throw new InvalidArgumentException('Method must be callable');
}
if ($responseCallback && !is_callable($responseCallback)) {
throw new InvalidArgumentException('Method must be callable');
}
$this->requestCallback = $requestCallback;
$this->responseCallback = $responseCallback;
}
public function canCacheRequest(RequestInterface $request)
{
return $this->requestCallback
? call_user_func($this->requestCallback, $request)
: parent::canCacheRequest($request);
}
public function canCacheResponse(Response $response)
{
return $this->responseCallback
? call_user_func($this->responseCallback, $response)
: parent::canCacheResponse($response);
}
}