114 lines
1.9 KiB
PHP
114 lines
1.9 KiB
PHP
<?php
|
|
/**
|
|
*
|
|
* This file is part of phpFastCache.
|
|
*
|
|
* @license MIT License (MIT)
|
|
*
|
|
* For full copyright and license information, please see the docs/CREDITS.txt file.
|
|
*
|
|
* @author Khoa Bui (khoaofgod) <khoaofgod@gmail.com> https://www.phpfastcache.com
|
|
* @author Georges.L (Geolim4) <contact@geolim4.com>
|
|
*
|
|
*/
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace Phpfastcache\Drivers\Ssdb;
|
|
|
|
use Phpfastcache\Config\ConfigurationOption;
|
|
|
|
class Config extends ConfigurationOption
|
|
{
|
|
/**
|
|
* @var string
|
|
*/
|
|
protected $host = '127.0.0.1';
|
|
|
|
/**
|
|
* @var int
|
|
*/
|
|
protected $port = 8888;
|
|
|
|
/**
|
|
* @var string
|
|
*/
|
|
protected $password = '';
|
|
|
|
/**
|
|
* @var int
|
|
*/
|
|
protected $timeout = 2000;
|
|
|
|
/**
|
|
* @return string
|
|
*/
|
|
public function getHost(): string
|
|
{
|
|
return $this->host;
|
|
}
|
|
|
|
/**
|
|
* @param string $host
|
|
* @return Config
|
|
*/
|
|
public function setHost(string $host): Config
|
|
{
|
|
$this->host = $host;
|
|
return $this;
|
|
}
|
|
|
|
/**
|
|
* @return int
|
|
*/
|
|
public function getPort(): int
|
|
{
|
|
return $this->port;
|
|
}
|
|
|
|
/**
|
|
* @param int $port
|
|
* @return Config
|
|
*/
|
|
public function setPort(int $port): Config
|
|
{
|
|
$this->port = $port;
|
|
return $this;
|
|
}
|
|
|
|
/**
|
|
* @return string
|
|
*/
|
|
public function getPassword(): string
|
|
{
|
|
return $this->password;
|
|
}
|
|
|
|
/**
|
|
* @param string $password
|
|
* @return Config
|
|
*/
|
|
public function setPassword(string $password): Config
|
|
{
|
|
$this->password = $password;
|
|
return $this;
|
|
}
|
|
|
|
/**
|
|
* @return int
|
|
*/
|
|
public function getTimeout(): int
|
|
{
|
|
return $this->timeout;
|
|
}
|
|
|
|
/**
|
|
* @param int $timeout
|
|
* @return Config
|
|
*/
|
|
public function setTimeout(int $timeout): Config
|
|
{
|
|
$this->timeout = $timeout;
|
|
return $this;
|
|
}
|
|
} |