mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-09-05 07:27:04 +03:00
Remove useless NewInstance
Bugfix: BodyStructure->SearchCharset return value
This commit is contained in:
parent
82e560bc53
commit
693e0f4c10
61 changed files with 802 additions and 1345 deletions
|
|
@ -43,13 +43,13 @@ class Memcache implements \MailSo\Cache\DriverInterface
|
|||
*/
|
||||
private $sKeyPrefix;
|
||||
|
||||
private function __construct(string $sHost = '127.0.0.1', int $iPost = 11211, int $iExpire = 43200, string $sKeyPrefix = '')
|
||||
function __construct(string $sHost = '127.0.0.1', int $iPost = 11211, int $iExpire = 43200, string $sKeyPrefix = '')
|
||||
{
|
||||
$this->sHost = $sHost;
|
||||
$this->iPost = $iPost;
|
||||
$this->iExpire = 0 < $iExpire ? $iExpire : 43200;
|
||||
|
||||
$this->oMem = new \Memcache();
|
||||
$this->oMem = new \Memcache;
|
||||
if (!$this->oMem->connect($this->sHost, $this->iPost))
|
||||
{
|
||||
$this->oMem = null;
|
||||
|
|
@ -63,11 +63,6 @@ class Memcache implements \MailSo\Cache\DriverInterface
|
|||
}
|
||||
}
|
||||
|
||||
public static function NewInstance(string $sHost = '127.0.0.1', int $iPost = 11211, int $iExpire = 43200, string $sKeyPrefix = '') : self
|
||||
{
|
||||
return new self($sHost, $iPost, $iExpire, $sKeyPrefix);
|
||||
}
|
||||
|
||||
public function Set(string $sKey, string $sValue) : bool
|
||||
{
|
||||
return $this->oMem ? $this->oMem->set($this->generateCachedKey($sKey), $sValue, 0, $this->iExpire) : false;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue