Back | Home
الـ Path الحالي: /home/picotech/domains/instantly.picotech.app/public_html/public/uploads/../../../public_html/vendor/psr/log/.././../mews/./../sebastian/../tijsverkoyen/./../symfony/./yaml/../polyfill-php80/../http-kernel/Event/../../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();
}
}