Remove useless NewInstance

Bugfix: BodyStructure->SearchCharset return value
This commit is contained in:
djmaze 2020-05-08 11:49:18 +02:00
parent 82e560bc53
commit 693e0f4c10
61 changed files with 802 additions and 1345 deletions

View file

@ -43,7 +43,7 @@ class Redis implements \MailSo\Cache\DriverInterface
*/
private $sKeyPrefix;
private function __construct(string $sHost = '127.0.0.1', int $iPost = 6379, int $iExpire = 43200, string $sKeyPrefix = '')
function __construct(string $sHost = '127.0.0.1', int $iPost = 6379, int $iExpire = 43200, string $sKeyPrefix = '')
{
$this->sHost = $sHost;
$this->iPost = $iPost;
@ -79,11 +79,6 @@ class Redis implements \MailSo\Cache\DriverInterface
}
}
public static function NewInstance(string $sHost = '127.0.0.1', int $iPost = 6379, int $iExpire = 43200, string $sKeyPrefix = '') : self
{
return new self($sHost, $iPost, $iExpire, $sKeyPrefix);
}
public function Set(string $sKey, string $sValue) : bool
{
return $this->oRedis ? $this->oRedis->setex($this->generateCachedKey($sKey), $this->iExpire, $sValue) : false;