code ident fixed
This commit is contained in:
parent
716498c2ce
commit
36cce72b66
|
@ -245,6 +245,7 @@ class Message
|
||||||
public function fetchStructure($options = 0)
|
public function fetchStructure($options = 0)
|
||||||
{
|
{
|
||||||
$structure = imap_fetchstructure($this->connection->getStream(), $this->msg_number, $options);
|
$structure = imap_fetchstructure($this->connection->getStream(), $this->msg_number, $options);
|
||||||
|
|
||||||
return $structure;
|
return $structure;
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -15,37 +15,38 @@ use Clivern\Imap\Core\Connection;
|
||||||
class Actions
|
class Actions
|
||||||
{
|
{
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var Connection
|
* @var Connection
|
||||||
*/
|
*/
|
||||||
protected $connection;
|
protected $connection;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var integer
|
* @var integer
|
||||||
*/
|
*/
|
||||||
protected $message_number;
|
protected $message_number;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var integer
|
* @var integer
|
||||||
*/
|
*/
|
||||||
protected $message_uid;
|
protected $message_uid;
|
||||||
|
|
||||||
public function __construct(Connection $connection)
|
public function __construct(Connection $connection)
|
||||||
{
|
{
|
||||||
$this->connection = $connection;
|
$this->connection = $connection;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Config Message
|
* Config Message
|
||||||
*
|
*
|
||||||
* @param integer $message_number
|
* @param integer $message_number
|
||||||
* @param integer $message_uid
|
* @param integer $message_uid
|
||||||
* @return Actions
|
* @return Actions
|
||||||
*/
|
*/
|
||||||
public function config($message_number, $message_uid)
|
public function config($message_number, $message_uid)
|
||||||
{
|
{
|
||||||
$this->message_number = $message_number;
|
$this->message_number = $message_number;
|
||||||
$this->message_uid = $message_uid;
|
$this->message_uid = $message_uid;
|
||||||
return $this;
|
|
||||||
}
|
return $this;
|
||||||
|
}
|
||||||
}
|
}
|
|
@ -12,5 +12,5 @@ namespace Clivern\Imap\Core\Message;
|
||||||
*/
|
*/
|
||||||
class Attachment
|
class Attachment
|
||||||
{
|
{
|
||||||
#~
|
#~
|
||||||
}
|
}
|
|
@ -15,89 +15,89 @@ use Clivern\Imap\Core\Connection;
|
||||||
class Header
|
class Header
|
||||||
{
|
{
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var Connection
|
* @var Connection
|
||||||
*/
|
*/
|
||||||
protected $connection;
|
protected $connection;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var integer
|
* @var integer
|
||||||
*/
|
*/
|
||||||
protected $message_number;
|
protected $message_number;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var integer
|
* @var integer
|
||||||
*/
|
*/
|
||||||
protected $message_uid;
|
protected $message_uid;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var array
|
* @var array
|
||||||
*/
|
*/
|
||||||
protected $header = [];
|
protected $header = [];
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class Constructor
|
* Class Constructor
|
||||||
*
|
*
|
||||||
* @param Connection $connection
|
* @param Connection $connection
|
||||||
*/
|
*/
|
||||||
public function __construct(Connection $connection)
|
public function __construct(Connection $connection)
|
||||||
{
|
{
|
||||||
$this->connection = $connection;
|
$this->connection = $connection;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Config Message
|
* Config Message
|
||||||
*
|
*
|
||||||
* @param integer $message_number
|
* @param integer $message_number
|
||||||
* @param integer $message_uid
|
* @param integer $message_uid
|
||||||
* @return Header
|
* @return Header
|
||||||
*/
|
*/
|
||||||
public function config($message_number, $message_uid, $options = 0)
|
public function config($message_number, $message_uid, $options = 0)
|
||||||
{
|
{
|
||||||
if( !empty($this->header) ){
|
if( !empty($this->header) ){
|
||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->message_number = $message_number;
|
$this->message_number = $message_number;
|
||||||
$this->message_uid = $message_uid;
|
$this->message_uid = $message_uid;
|
||||||
$this->load();
|
$this->load();
|
||||||
|
|
||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get From Header
|
* Get From Header
|
||||||
*
|
*
|
||||||
* @param string $key
|
* @param string $key
|
||||||
* @param boolean $default
|
* @param boolean $default
|
||||||
* @return mixed
|
* @return mixed
|
||||||
*/
|
*/
|
||||||
public function get($key, $default = false)
|
public function get($key, $default = false)
|
||||||
{
|
{
|
||||||
return (isset($this->header[strtolower($key)])) ? $this->header[strtolower($key)] : $default;
|
return (isset($this->header[strtolower($key)])) ? $this->header[strtolower($key)] : $default;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Check if header has key
|
* Check if header has key
|
||||||
*
|
*
|
||||||
* @param string $key
|
* @param string $key
|
||||||
* @return boolean
|
* @return boolean
|
||||||
*/
|
*/
|
||||||
public function has($key)
|
public function has($key)
|
||||||
{
|
{
|
||||||
return (isset($this->header[strtolower($key)]));
|
return (isset($this->header[strtolower($key)]));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Load Header Data
|
* Load Header Data
|
||||||
*
|
*
|
||||||
* @param mixed $options
|
* @param mixed $options
|
||||||
* @return Header
|
* @return Header
|
||||||
*/
|
*/
|
||||||
protected function load($options = 0)
|
protected function load($options = 0)
|
||||||
{
|
{
|
||||||
$overview = imap_fetch_overview($this->connection->getStream(), $this->message_number, $options);
|
$overview = imap_fetch_overview($this->connection->getStream(), $this->message_number, $options);
|
||||||
|
|
||||||
foreach ($overview as $key => $item_overview) {
|
foreach ($overview as $key => $item_overview) {
|
||||||
$this->header['subject'] = (isset($item_overview->subject)) ? $item_overview->subject : false;
|
$this->header['subject'] = (isset($item_overview->subject)) ? $item_overview->subject : false;
|
||||||
|
@ -118,5 +118,5 @@ class Header
|
||||||
}
|
}
|
||||||
|
|
||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -14,13 +14,13 @@ use Clivern\Imap\Core\Search\Contract\Condition;
|
||||||
*/
|
*/
|
||||||
class All implements Condition
|
class All implements Condition
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* Query String
|
* Query String
|
||||||
*
|
*
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public function __toString()
|
public function __toString()
|
||||||
{
|
{
|
||||||
return "ALL";
|
return "ALL";
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -14,13 +14,13 @@ use Clivern\Imap\Core\Search\Contract\Condition;
|
||||||
*/
|
*/
|
||||||
class Answered implements Condition
|
class Answered implements Condition
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* Query String
|
* Query String
|
||||||
*
|
*
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public function __toString()
|
public function __toString()
|
||||||
{
|
{
|
||||||
return "ANSWERED";
|
return "ANSWERED";
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -15,28 +15,28 @@ use Clivern\Imap\Core\Search\Contract\Condition;
|
||||||
class BCC implements Condition
|
class BCC implements Condition
|
||||||
{
|
{
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var string
|
* @var string
|
||||||
*/
|
*/
|
||||||
protected $data;
|
protected $data;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class Constructor
|
* Class Constructor
|
||||||
*
|
*
|
||||||
* @param string $data
|
* @param string $data
|
||||||
*/
|
*/
|
||||||
public function __construct($data)
|
public function __construct($data)
|
||||||
{
|
{
|
||||||
$this->data = $data;
|
$this->data = $data;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Query String
|
* Query String
|
||||||
*
|
*
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public function __toString()
|
public function __toString()
|
||||||
{
|
{
|
||||||
return "BCC \"{$this->data}\"";
|
return "BCC \"{$this->data}\"";
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -15,28 +15,28 @@ use Clivern\Imap\Core\Search\Contract\Condition;
|
||||||
class Before implements Condition
|
class Before implements Condition
|
||||||
{
|
{
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var string
|
* @var string
|
||||||
*/
|
*/
|
||||||
protected $data;
|
protected $data;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class Constructor
|
* Class Constructor
|
||||||
*
|
*
|
||||||
* @param string $data
|
* @param string $data
|
||||||
*/
|
*/
|
||||||
public function __construct($data)
|
public function __construct($data)
|
||||||
{
|
{
|
||||||
$this->data = $data;
|
$this->data = $data;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Query String
|
* Query String
|
||||||
*
|
*
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public function __toString()
|
public function __toString()
|
||||||
{
|
{
|
||||||
return "BEFORE \"{$this->data}\"";
|
return "BEFORE \"{$this->data}\"";
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -15,28 +15,28 @@ use Clivern\Imap\Core\Search\Contract\Condition;
|
||||||
class Body implements Condition
|
class Body implements Condition
|
||||||
{
|
{
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var string
|
* @var string
|
||||||
*/
|
*/
|
||||||
protected $data;
|
protected $data;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class Constructor
|
* Class Constructor
|
||||||
*
|
*
|
||||||
* @param string $data
|
* @param string $data
|
||||||
*/
|
*/
|
||||||
public function __construct($data)
|
public function __construct($data)
|
||||||
{
|
{
|
||||||
$this->data = $data;
|
$this->data = $data;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Query String
|
* Query String
|
||||||
*
|
*
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public function __toString()
|
public function __toString()
|
||||||
{
|
{
|
||||||
return "BODY \"{$this->data}\"";
|
return "BODY \"{$this->data}\"";
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -15,28 +15,28 @@ use Clivern\Imap\Core\Search\Contract\Condition;
|
||||||
class CC implements Condition
|
class CC implements Condition
|
||||||
{
|
{
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var string
|
* @var string
|
||||||
*/
|
*/
|
||||||
protected $data;
|
protected $data;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class Constructor
|
* Class Constructor
|
||||||
*
|
*
|
||||||
* @param string $data
|
* @param string $data
|
||||||
*/
|
*/
|
||||||
public function __construct($data)
|
public function __construct($data)
|
||||||
{
|
{
|
||||||
$this->data = $data;
|
$this->data = $data;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Query String
|
* Query String
|
||||||
*
|
*
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public function __toString()
|
public function __toString()
|
||||||
{
|
{
|
||||||
return "CC \"{$this->data}\"";
|
return "CC \"{$this->data}\"";
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -14,13 +14,13 @@ use Clivern\Imap\Core\Search\Contract\Condition;
|
||||||
*/
|
*/
|
||||||
class Deleted implements Condition
|
class Deleted implements Condition
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* Query String
|
* Query String
|
||||||
*
|
*
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public function __toString()
|
public function __toString()
|
||||||
{
|
{
|
||||||
return "DELETED";
|
return "DELETED";
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -14,13 +14,13 @@ use Clivern\Imap\Core\Search\Contract\Condition;
|
||||||
*/
|
*/
|
||||||
class Flagged implements Condition
|
class Flagged implements Condition
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* Query String
|
* Query String
|
||||||
*
|
*
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public function __toString()
|
public function __toString()
|
||||||
{
|
{
|
||||||
return "FLAGGED";
|
return "FLAGGED";
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -15,28 +15,28 @@ use Clivern\Imap\Core\Search\Contract\Condition;
|
||||||
class From implements Condition
|
class From implements Condition
|
||||||
{
|
{
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var string
|
* @var string
|
||||||
*/
|
*/
|
||||||
protected $data;
|
protected $data;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class Constructor
|
* Class Constructor
|
||||||
*
|
*
|
||||||
* @param string $data
|
* @param string $data
|
||||||
*/
|
*/
|
||||||
public function __construct($data)
|
public function __construct($data)
|
||||||
{
|
{
|
||||||
$this->data = $data;
|
$this->data = $data;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Query String
|
* Query String
|
||||||
*
|
*
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public function __toString()
|
public function __toString()
|
||||||
{
|
{
|
||||||
return "FROM \"{$this->data}\"";
|
return "FROM \"{$this->data}\"";
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -15,28 +15,28 @@ use Clivern\Imap\Core\Search\Contract\Condition;
|
||||||
class Keyword implements Condition
|
class Keyword implements Condition
|
||||||
{
|
{
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var string
|
* @var string
|
||||||
*/
|
*/
|
||||||
protected $data;
|
protected $data;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class Constructor
|
* Class Constructor
|
||||||
*
|
*
|
||||||
* @param string $data
|
* @param string $data
|
||||||
*/
|
*/
|
||||||
public function __construct($data)
|
public function __construct($data)
|
||||||
{
|
{
|
||||||
$this->data = $data;
|
$this->data = $data;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Query String
|
* Query String
|
||||||
*
|
*
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public function __toString()
|
public function __toString()
|
||||||
{
|
{
|
||||||
return "KEYWORD \"{$this->data}\"";
|
return "KEYWORD \"{$this->data}\"";
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -14,13 +14,13 @@ use Clivern\Imap\Core\Search\Contract\Condition;
|
||||||
*/
|
*/
|
||||||
class NewFlag implements Condition
|
class NewFlag implements Condition
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* Query String
|
* Query String
|
||||||
*
|
*
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public function __toString()
|
public function __toString()
|
||||||
{
|
{
|
||||||
return "NEW";
|
return "NEW";
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -14,13 +14,13 @@ use Clivern\Imap\Core\Search\Contract\Condition;
|
||||||
*/
|
*/
|
||||||
class Old implements Condition
|
class Old implements Condition
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* Query String
|
* Query String
|
||||||
*
|
*
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public function __toString()
|
public function __toString()
|
||||||
{
|
{
|
||||||
return "OLD";
|
return "OLD";
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -15,28 +15,28 @@ use Clivern\Imap\Core\Search\Contract\Condition;
|
||||||
class On implements Condition
|
class On implements Condition
|
||||||
{
|
{
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var string
|
* @var string
|
||||||
*/
|
*/
|
||||||
protected $data;
|
protected $data;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class Constructor
|
* Class Constructor
|
||||||
*
|
*
|
||||||
* @param string $data
|
* @param string $data
|
||||||
*/
|
*/
|
||||||
public function __construct($data)
|
public function __construct($data)
|
||||||
{
|
{
|
||||||
$this->data = $data;
|
$this->data = $data;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Query String
|
* Query String
|
||||||
*
|
*
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public function __toString()
|
public function __toString()
|
||||||
{
|
{
|
||||||
return "ON \"{$this->data}\"";
|
return "ON \"{$this->data}\"";
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -14,13 +14,13 @@ use Clivern\Imap\Core\Search\Contract\Condition;
|
||||||
*/
|
*/
|
||||||
class Recent implements Condition
|
class Recent implements Condition
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* Query String
|
* Query String
|
||||||
*
|
*
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public function __toString()
|
public function __toString()
|
||||||
{
|
{
|
||||||
return "RECENT";
|
return "RECENT";
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -14,13 +14,13 @@ use Clivern\Imap\Core\Search\Contract\Condition;
|
||||||
*/
|
*/
|
||||||
class Seen implements Condition
|
class Seen implements Condition
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* Query String
|
* Query String
|
||||||
*
|
*
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public function __toString()
|
public function __toString()
|
||||||
{
|
{
|
||||||
return "SEEN";
|
return "SEEN";
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -15,28 +15,28 @@ use Clivern\Imap\Core\Search\Contract\Condition;
|
||||||
class Since implements Condition
|
class Since implements Condition
|
||||||
{
|
{
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var string
|
* @var string
|
||||||
*/
|
*/
|
||||||
protected $data;
|
protected $data;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class Constructor
|
* Class Constructor
|
||||||
*
|
*
|
||||||
* @param string $data
|
* @param string $data
|
||||||
*/
|
*/
|
||||||
public function __construct($data)
|
public function __construct($data)
|
||||||
{
|
{
|
||||||
$this->data = $data;
|
$this->data = $data;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Query String
|
* Query String
|
||||||
*
|
*
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public function __toString()
|
public function __toString()
|
||||||
{
|
{
|
||||||
return "SINCE \"{$this->data}\"";
|
return "SINCE \"{$this->data}\"";
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -15,28 +15,28 @@ use Clivern\Imap\Core\Search\Contract\Condition;
|
||||||
class Subject implements Condition
|
class Subject implements Condition
|
||||||
{
|
{
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var string
|
* @var string
|
||||||
*/
|
*/
|
||||||
protected $data;
|
protected $data;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class Constructor
|
* Class Constructor
|
||||||
*
|
*
|
||||||
* @param string $data
|
* @param string $data
|
||||||
*/
|
*/
|
||||||
public function __construct($data)
|
public function __construct($data)
|
||||||
{
|
{
|
||||||
$this->data = $data;
|
$this->data = $data;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Query String
|
* Query String
|
||||||
*
|
*
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public function __toString()
|
public function __toString()
|
||||||
{
|
{
|
||||||
return "SUBJECT \"{$this->data}\"";
|
return "SUBJECT \"{$this->data}\"";
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -15,28 +15,28 @@ use Clivern\Imap\Core\Search\Contract\Condition;
|
||||||
class Text implements Condition
|
class Text implements Condition
|
||||||
{
|
{
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var string
|
* @var string
|
||||||
*/
|
*/
|
||||||
protected $data;
|
protected $data;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class Constructor
|
* Class Constructor
|
||||||
*
|
*
|
||||||
* @param string $data
|
* @param string $data
|
||||||
*/
|
*/
|
||||||
public function __construct($data)
|
public function __construct($data)
|
||||||
{
|
{
|
||||||
$this->data = $data;
|
$this->data = $data;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Query String
|
* Query String
|
||||||
*
|
*
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public function __toString()
|
public function __toString()
|
||||||
{
|
{
|
||||||
return "TEXT \"{$this->data}\"";
|
return "TEXT \"{$this->data}\"";
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -15,28 +15,28 @@ use Clivern\Imap\Core\Search\Contract\Condition;
|
||||||
class To implements Condition
|
class To implements Condition
|
||||||
{
|
{
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var string
|
* @var string
|
||||||
*/
|
*/
|
||||||
protected $data;
|
protected $data;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class Constructor
|
* Class Constructor
|
||||||
*
|
*
|
||||||
* @param string $data
|
* @param string $data
|
||||||
*/
|
*/
|
||||||
public function __construct($data)
|
public function __construct($data)
|
||||||
{
|
{
|
||||||
$this->data = $data;
|
$this->data = $data;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Query String
|
* Query String
|
||||||
*
|
*
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public function __toString()
|
public function __toString()
|
||||||
{
|
{
|
||||||
return "TO \"{$this->data}\"";
|
return "TO \"{$this->data}\"";
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -14,13 +14,13 @@ use Clivern\Imap\Core\Search\Contract\Condition;
|
||||||
*/
|
*/
|
||||||
class UnAnswered implements Condition
|
class UnAnswered implements Condition
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* Query String
|
* Query String
|
||||||
*
|
*
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public function __toString()
|
public function __toString()
|
||||||
{
|
{
|
||||||
return "UNANSWERED";
|
return "UNANSWERED";
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -14,13 +14,13 @@ use Clivern\Imap\Core\Search\Contract\Condition;
|
||||||
*/
|
*/
|
||||||
class UnDeleted implements Condition
|
class UnDeleted implements Condition
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* Query String
|
* Query String
|
||||||
*
|
*
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public function __toString()
|
public function __toString()
|
||||||
{
|
{
|
||||||
return "UNDELETED";
|
return "UNDELETED";
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -14,13 +14,13 @@ use Clivern\Imap\Core\Search\Contract\Condition;
|
||||||
*/
|
*/
|
||||||
class UnFlagged implements Condition
|
class UnFlagged implements Condition
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* Query String
|
* Query String
|
||||||
*
|
*
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public function __toString()
|
public function __toString()
|
||||||
{
|
{
|
||||||
return "UNFLAGGED";
|
return "UNFLAGGED";
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -15,28 +15,28 @@ use Clivern\Imap\Core\Search\Contract\Condition;
|
||||||
class UnKeyword implements Condition
|
class UnKeyword implements Condition
|
||||||
{
|
{
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var string
|
* @var string
|
||||||
*/
|
*/
|
||||||
protected $data;
|
protected $data;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class Constructor
|
* Class Constructor
|
||||||
*
|
*
|
||||||
* @param string $data
|
* @param string $data
|
||||||
*/
|
*/
|
||||||
public function __construct($data)
|
public function __construct($data)
|
||||||
{
|
{
|
||||||
$this->data = $data;
|
$this->data = $data;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Query String
|
* Query String
|
||||||
*
|
*
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public function __toString()
|
public function __toString()
|
||||||
{
|
{
|
||||||
return "UNKEYWORD \"{$this->data}\"";
|
return "UNKEYWORD \"{$this->data}\"";
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -14,13 +14,13 @@ use Clivern\Imap\Core\Search\Contract\Condition;
|
||||||
*/
|
*/
|
||||||
class UnSeen implements Condition
|
class UnSeen implements Condition
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* Query String
|
* Query String
|
||||||
*
|
*
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public function __toString()
|
public function __toString()
|
||||||
{
|
{
|
||||||
return "UNSEEN";
|
return "UNSEEN";
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -12,5 +12,5 @@ namespace Clivern\Imap\Core\Search\Contract;
|
||||||
*/
|
*/
|
||||||
interface Condition
|
interface Condition
|
||||||
{
|
{
|
||||||
public function __toString();
|
public function __toString();
|
||||||
}
|
}
|
Loading…
Reference in a new issue