Gaufrette\Adapter\Ftp::__construct PHP Method

__construct() public method

public __construct ( string $directory, string $host, array $options = [] )
$directory string The directory to use in the ftp server
$host string The host of the ftp server
$options array The options like port, username, password, passive, create, mode
    public function __construct($directory, $host, $options = array())
    {
        if (!extension_loaded('ftp')) {
            throw new \RuntimeException('Unable to use Gaufrette\\Adapter\\Ftp as the FTP extension is not available.');
        }
        $this->directory = (string) $directory;
        $this->host = $host;
        $this->port = isset($options['port']) ? $options['port'] : 21;
        $this->username = isset($options['username']) ? $options['username'] : null;
        $this->password = isset($options['password']) ? $options['password'] : null;
        $this->passive = isset($options['passive']) ? $options['passive'] : false;
        $this->create = isset($options['create']) ? $options['create'] : false;
        $this->mode = isset($options['mode']) ? $options['mode'] : FTP_BINARY;
        $this->ssl = isset($options['ssl']) ? $options['ssl'] : false;
        $this->utf8 = isset($options['utf8']) ? $options['utf8'] : false;
    }