Back | Home
الـ Path الحالي: /home/picotech/domains/instantly.picotech.app/public_html/public/../vendor/markbaker/../paypal/../iyzico/./../unicodeveloper/laravel-paystack/../../paypal/../phar-io/../../vendor/symfony/../dragonmantank/../guzzlehttp/../authorizenet/../dflydev/../webmozart/../unicodeveloper/../fakerphp/.././symfony/event-dispatcher/./../http-client/././Internal
الملفات الموجودة في هذا الـ Path:
.
..
AmpBody.php
AmpClientState.php
AmpListener.php
AmpResolver.php
Canary.php
ClientState.php
CurlClientState.php
DnsCache.php
HttplugWaitLoop.php
LegacyHttplugInterface.php
NativeClientState.php
PushedResponse.php
مشاهدة ملف: Canary.php
<?php
/*
* This file is part of the Symfony package.
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Symfony\Component\HttpClient\Internal;
/**
* @author Nicolas Grekas <p@tchwork.com>
*
* @internal
*/
final class Canary
{
private \Closure $canceller;
public function __construct(\Closure $canceller)
{
$this->canceller = $canceller;
}
public function cancel(): void
{
if (isset($this->canceller)) {
$canceller = $this->canceller;
unset($this->canceller);
$canceller();
}
}
public function __destruct()
{
$this->cancel();
}
}