mirror of
https://github.com/the-djmaze/snappymail.git
synced 2025-01-10 00:38:04 +08:00
95 lines
1.4 KiB
PHP
95 lines
1.4 KiB
PHP
<?php
|
|
|
|
/*
|
|
* This file is part of MailSo.
|
|
*
|
|
* (c) 2014 Usenko Timur
|
|
*
|
|
* For the full copyright and license information, please view the LICENSE
|
|
* file that was distributed with this source code.
|
|
*/
|
|
|
|
namespace MailSo\Imap;
|
|
|
|
/**
|
|
* @category MailSo
|
|
* @package Imap
|
|
*/
|
|
class FolderInformation
|
|
{
|
|
/**
|
|
* @var string
|
|
*/
|
|
public $FolderName;
|
|
|
|
/**
|
|
* @var bool
|
|
*/
|
|
public $IsWritable;
|
|
|
|
/**
|
|
* @var array
|
|
*/
|
|
public $Flags;
|
|
|
|
/**
|
|
* @var array
|
|
*/
|
|
public $PermanentFlags;
|
|
|
|
/**
|
|
* @var int
|
|
*/
|
|
public $Exists;
|
|
|
|
/**
|
|
* @var int
|
|
*/
|
|
public $Recent;
|
|
|
|
/**
|
|
* @var string
|
|
*/
|
|
public $Uidvalidity;
|
|
|
|
/**
|
|
* @var int
|
|
*/
|
|
public $Unread;
|
|
|
|
/**
|
|
* @var string
|
|
*/
|
|
public $Uidnext;
|
|
|
|
/**
|
|
* @var string
|
|
*/
|
|
public $HighestModSeq;
|
|
|
|
private function __construct(string $sFolderName, bool $bIsWritable)
|
|
{
|
|
$this->FolderName = $sFolderName;
|
|
$this->IsWritable = $bIsWritable;
|
|
$this->Exists = null;
|
|
$this->Recent = null;
|
|
$this->Flags = array();
|
|
$this->PermanentFlags = array();
|
|
|
|
$this->Unread = null;
|
|
$this->Uidnext = null;
|
|
$this->HighestModSeq = null;
|
|
}
|
|
|
|
public static function NewInstance(string $sFolderName, bool $bIsWritable) : self
|
|
{
|
|
return new self($sFolderName, $bIsWritable);
|
|
}
|
|
|
|
public function IsFlagSupported(string $sFlag) : bool
|
|
{
|
|
return \in_array('\\*', $this->PermanentFlags) ||
|
|
\in_array($sFlag, $this->PermanentFlags) ||
|
|
\in_array($sFlag, $this->Flags);
|
|
}
|
|
}
|