diff --git a/src/Core/Message.php b/src/Core/Message.php index 028f4b4..f272bda 100644 --- a/src/Core/Message.php +++ b/src/Core/Message.php @@ -245,6 +245,7 @@ class Message public function fetchStructure($options = 0) { $structure = imap_fetchstructure($this->connection->getStream(), $this->msg_number, $options); + return $structure; } } \ No newline at end of file diff --git a/src/Core/Message/Actions.php b/src/Core/Message/Actions.php index 24e8996..f005a15 100644 --- a/src/Core/Message/Actions.php +++ b/src/Core/Message/Actions.php @@ -15,37 +15,38 @@ use Clivern\Imap\Core\Connection; class Actions { - /** - * @var Connection - */ - protected $connection; + /** + * @var Connection + */ + protected $connection; - /** - * @var integer - */ - protected $message_number; + /** + * @var integer + */ + protected $message_number; - /** - * @var integer - */ - protected $message_uid; + /** + * @var integer + */ + protected $message_uid; - public function __construct(Connection $connection) - { - $this->connection = $connection; - } + public function __construct(Connection $connection) + { + $this->connection = $connection; + } - /** - * Config Message - * - * @param integer $message_number - * @param integer $message_uid - * @return Actions - */ - public function config($message_number, $message_uid) - { - $this->message_number = $message_number; - $this->message_uid = $message_uid; - return $this; - } + /** + * Config Message + * + * @param integer $message_number + * @param integer $message_uid + * @return Actions + */ + public function config($message_number, $message_uid) + { + $this->message_number = $message_number; + $this->message_uid = $message_uid; + + return $this; + } } \ No newline at end of file diff --git a/src/Core/Message/Attachment.php b/src/Core/Message/Attachment.php index e94e672..b7c991a 100644 --- a/src/Core/Message/Attachment.php +++ b/src/Core/Message/Attachment.php @@ -12,5 +12,5 @@ namespace Clivern\Imap\Core\Message; */ class Attachment { - #~ + #~ } \ No newline at end of file diff --git a/src/Core/Message/Header.php b/src/Core/Message/Header.php index 6aff6d8..eca5242 100644 --- a/src/Core/Message/Header.php +++ b/src/Core/Message/Header.php @@ -15,89 +15,89 @@ use Clivern\Imap\Core\Connection; class Header { - /** - * @var Connection - */ - protected $connection; + /** + * @var Connection + */ + protected $connection; - /** - * @var integer - */ - protected $message_number; + /** + * @var integer + */ + protected $message_number; - /** - * @var integer - */ - protected $message_uid; + /** + * @var integer + */ + protected $message_uid; - /** - * @var array - */ - protected $header = []; + /** + * @var array + */ + protected $header = []; - /** - * Class Constructor - * - * @param Connection $connection - */ - public function __construct(Connection $connection) - { - $this->connection = $connection; - } + /** + * Class Constructor + * + * @param Connection $connection + */ + public function __construct(Connection $connection) + { + $this->connection = $connection; + } - /** - * Config Message - * - * @param integer $message_number - * @param integer $message_uid - * @return Header - */ - public function config($message_number, $message_uid, $options = 0) - { - if( !empty($this->header) ){ - return $this; - } + /** + * Config Message + * + * @param integer $message_number + * @param integer $message_uid + * @return Header + */ + public function config($message_number, $message_uid, $options = 0) + { + if( !empty($this->header) ){ + return $this; + } - $this->message_number = $message_number; - $this->message_uid = $message_uid; - $this->load(); + $this->message_number = $message_number; + $this->message_uid = $message_uid; + $this->load(); - return $this; - } + return $this; + } - /** - * Get From Header - * - * @param string $key - * @param boolean $default - * @return mixed - */ - public function get($key, $default = false) - { - return (isset($this->header[strtolower($key)])) ? $this->header[strtolower($key)] : $default; - } + /** + * Get From Header + * + * @param string $key + * @param boolean $default + * @return mixed + */ + public function get($key, $default = false) + { + return (isset($this->header[strtolower($key)])) ? $this->header[strtolower($key)] : $default; + } - /** - * Check if header has key - * - * @param string $key - * @return boolean - */ - public function has($key) - { - return (isset($this->header[strtolower($key)])); - } + /** + * Check if header has key + * + * @param string $key + * @return boolean + */ + public function has($key) + { + return (isset($this->header[strtolower($key)])); + } - /** - * Load Header Data - * - * @param mixed $options - * @return Header - */ - protected function load($options = 0) - { - $overview = imap_fetch_overview($this->connection->getStream(), $this->message_number, $options); + /** + * Load Header Data + * + * @param mixed $options + * @return Header + */ + protected function load($options = 0) + { + $overview = imap_fetch_overview($this->connection->getStream(), $this->message_number, $options); foreach ($overview as $key => $item_overview) { $this->header['subject'] = (isset($item_overview->subject)) ? $item_overview->subject : false; @@ -118,5 +118,5 @@ class Header } return $this; - } + } } \ No newline at end of file diff --git a/src/Core/Search/Condition/All.php b/src/Core/Search/Condition/All.php index 991d82e..c78fb3e 100644 --- a/src/Core/Search/Condition/All.php +++ b/src/Core/Search/Condition/All.php @@ -14,13 +14,13 @@ use Clivern\Imap\Core\Search\Contract\Condition; */ class All implements Condition { - /** - * Query String - * - * @return string - */ - public function __toString() - { - return "ALL"; - } + /** + * Query String + * + * @return string + */ + public function __toString() + { + return "ALL"; + } } \ No newline at end of file diff --git a/src/Core/Search/Condition/Answered.php b/src/Core/Search/Condition/Answered.php index ec3d227..df9db00 100644 --- a/src/Core/Search/Condition/Answered.php +++ b/src/Core/Search/Condition/Answered.php @@ -14,13 +14,13 @@ use Clivern\Imap\Core\Search\Contract\Condition; */ class Answered implements Condition { - /** - * Query String - * - * @return string - */ - public function __toString() - { - return "ANSWERED"; - } + /** + * Query String + * + * @return string + */ + public function __toString() + { + return "ANSWERED"; + } } \ No newline at end of file diff --git a/src/Core/Search/Condition/BCC.php b/src/Core/Search/Condition/BCC.php index 873c949..c1247ea 100644 --- a/src/Core/Search/Condition/BCC.php +++ b/src/Core/Search/Condition/BCC.php @@ -15,28 +15,28 @@ use Clivern\Imap\Core\Search\Contract\Condition; class BCC implements Condition { - /** - * @var string - */ - protected $data; + /** + * @var string + */ + protected $data; - /** - * Class Constructor - * - * @param string $data - */ - public function __construct($data) - { - $this->data = $data; - } + /** + * Class Constructor + * + * @param string $data + */ + public function __construct($data) + { + $this->data = $data; + } - /** - * Query String - * - * @return string - */ - public function __toString() - { - return "BCC \"{$this->data}\""; - } + /** + * Query String + * + * @return string + */ + public function __toString() + { + return "BCC \"{$this->data}\""; + } } \ No newline at end of file diff --git a/src/Core/Search/Condition/Before.php b/src/Core/Search/Condition/Before.php index c6723d9..9eabd72 100644 --- a/src/Core/Search/Condition/Before.php +++ b/src/Core/Search/Condition/Before.php @@ -15,28 +15,28 @@ use Clivern\Imap\Core\Search\Contract\Condition; class Before implements Condition { - /** - * @var string - */ - protected $data; + /** + * @var string + */ + protected $data; - /** - * Class Constructor - * - * @param string $data - */ - public function __construct($data) - { - $this->data = $data; - } + /** + * Class Constructor + * + * @param string $data + */ + public function __construct($data) + { + $this->data = $data; + } - /** - * Query String - * - * @return string - */ - public function __toString() - { - return "BEFORE \"{$this->data}\""; - } + /** + * Query String + * + * @return string + */ + public function __toString() + { + return "BEFORE \"{$this->data}\""; + } } \ No newline at end of file diff --git a/src/Core/Search/Condition/Body.php b/src/Core/Search/Condition/Body.php index 77359a3..80d48ad 100644 --- a/src/Core/Search/Condition/Body.php +++ b/src/Core/Search/Condition/Body.php @@ -15,28 +15,28 @@ use Clivern\Imap\Core\Search\Contract\Condition; class Body implements Condition { - /** - * @var string - */ - protected $data; + /** + * @var string + */ + protected $data; - /** - * Class Constructor - * - * @param string $data - */ - public function __construct($data) - { - $this->data = $data; - } + /** + * Class Constructor + * + * @param string $data + */ + public function __construct($data) + { + $this->data = $data; + } - /** - * Query String - * - * @return string - */ - public function __toString() - { - return "BODY \"{$this->data}\""; - } + /** + * Query String + * + * @return string + */ + public function __toString() + { + return "BODY \"{$this->data}\""; + } } \ No newline at end of file diff --git a/src/Core/Search/Condition/CC.php b/src/Core/Search/Condition/CC.php index 0d8ccdb..208b58a 100644 --- a/src/Core/Search/Condition/CC.php +++ b/src/Core/Search/Condition/CC.php @@ -15,28 +15,28 @@ use Clivern\Imap\Core\Search\Contract\Condition; class CC implements Condition { - /** - * @var string - */ - protected $data; + /** + * @var string + */ + protected $data; - /** - * Class Constructor - * - * @param string $data - */ - public function __construct($data) - { - $this->data = $data; - } + /** + * Class Constructor + * + * @param string $data + */ + public function __construct($data) + { + $this->data = $data; + } - /** - * Query String - * - * @return string - */ - public function __toString() - { - return "CC \"{$this->data}\""; - } + /** + * Query String + * + * @return string + */ + public function __toString() + { + return "CC \"{$this->data}\""; + } } \ No newline at end of file diff --git a/src/Core/Search/Condition/Deleted.php b/src/Core/Search/Condition/Deleted.php index 007e85e..cebca67 100644 --- a/src/Core/Search/Condition/Deleted.php +++ b/src/Core/Search/Condition/Deleted.php @@ -14,13 +14,13 @@ use Clivern\Imap\Core\Search\Contract\Condition; */ class Deleted implements Condition { - /** - * Query String - * - * @return string - */ - public function __toString() - { - return "DELETED"; - } + /** + * Query String + * + * @return string + */ + public function __toString() + { + return "DELETED"; + } } \ No newline at end of file diff --git a/src/Core/Search/Condition/Flagged.php b/src/Core/Search/Condition/Flagged.php index 6740cb3..7863b8e 100644 --- a/src/Core/Search/Condition/Flagged.php +++ b/src/Core/Search/Condition/Flagged.php @@ -14,13 +14,13 @@ use Clivern\Imap\Core\Search\Contract\Condition; */ class Flagged implements Condition { - /** - * Query String - * - * @return string - */ - public function __toString() - { - return "FLAGGED"; - } + /** + * Query String + * + * @return string + */ + public function __toString() + { + return "FLAGGED"; + } } \ No newline at end of file diff --git a/src/Core/Search/Condition/From.php b/src/Core/Search/Condition/From.php index 1d7ca6a..6b83739 100644 --- a/src/Core/Search/Condition/From.php +++ b/src/Core/Search/Condition/From.php @@ -15,28 +15,28 @@ use Clivern\Imap\Core\Search\Contract\Condition; class From implements Condition { - /** - * @var string - */ - protected $data; + /** + * @var string + */ + protected $data; - /** - * Class Constructor - * - * @param string $data - */ - public function __construct($data) - { - $this->data = $data; - } + /** + * Class Constructor + * + * @param string $data + */ + public function __construct($data) + { + $this->data = $data; + } - /** - * Query String - * - * @return string - */ - public function __toString() - { - return "FROM \"{$this->data}\""; - } + /** + * Query String + * + * @return string + */ + public function __toString() + { + return "FROM \"{$this->data}\""; + } } \ No newline at end of file diff --git a/src/Core/Search/Condition/Keyword.php b/src/Core/Search/Condition/Keyword.php index e1a4d5f..df51231 100644 --- a/src/Core/Search/Condition/Keyword.php +++ b/src/Core/Search/Condition/Keyword.php @@ -15,28 +15,28 @@ use Clivern\Imap\Core\Search\Contract\Condition; class Keyword implements Condition { - /** - * @var string - */ - protected $data; + /** + * @var string + */ + protected $data; - /** - * Class Constructor - * - * @param string $data - */ - public function __construct($data) - { - $this->data = $data; - } + /** + * Class Constructor + * + * @param string $data + */ + public function __construct($data) + { + $this->data = $data; + } - /** - * Query String - * - * @return string - */ - public function __toString() - { - return "KEYWORD \"{$this->data}\""; - } + /** + * Query String + * + * @return string + */ + public function __toString() + { + return "KEYWORD \"{$this->data}\""; + } } \ No newline at end of file diff --git a/src/Core/Search/Condition/NewFlag.php b/src/Core/Search/Condition/NewFlag.php index b7b628c..c06a4cd 100644 --- a/src/Core/Search/Condition/NewFlag.php +++ b/src/Core/Search/Condition/NewFlag.php @@ -14,13 +14,13 @@ use Clivern\Imap\Core\Search\Contract\Condition; */ class NewFlag implements Condition { - /** - * Query String - * - * @return string - */ - public function __toString() - { - return "NEW"; - } + /** + * Query String + * + * @return string + */ + public function __toString() + { + return "NEW"; + } } \ No newline at end of file diff --git a/src/Core/Search/Condition/Old.php b/src/Core/Search/Condition/Old.php index 1f0613a..ac534b2 100644 --- a/src/Core/Search/Condition/Old.php +++ b/src/Core/Search/Condition/Old.php @@ -14,13 +14,13 @@ use Clivern\Imap\Core\Search\Contract\Condition; */ class Old implements Condition { - /** - * Query String - * - * @return string - */ - public function __toString() - { - return "OLD"; - } + /** + * Query String + * + * @return string + */ + public function __toString() + { + return "OLD"; + } } \ No newline at end of file diff --git a/src/Core/Search/Condition/On.php b/src/Core/Search/Condition/On.php index 69bb7ab..9ff3aa3 100644 --- a/src/Core/Search/Condition/On.php +++ b/src/Core/Search/Condition/On.php @@ -15,28 +15,28 @@ use Clivern\Imap\Core\Search\Contract\Condition; class On implements Condition { - /** - * @var string - */ - protected $data; + /** + * @var string + */ + protected $data; - /** - * Class Constructor - * - * @param string $data - */ - public function __construct($data) - { - $this->data = $data; - } + /** + * Class Constructor + * + * @param string $data + */ + public function __construct($data) + { + $this->data = $data; + } - /** - * Query String - * - * @return string - */ - public function __toString() - { - return "ON \"{$this->data}\""; - } + /** + * Query String + * + * @return string + */ + public function __toString() + { + return "ON \"{$this->data}\""; + } } \ No newline at end of file diff --git a/src/Core/Search/Condition/Recent.php b/src/Core/Search/Condition/Recent.php index 95da2b5..7487344 100644 --- a/src/Core/Search/Condition/Recent.php +++ b/src/Core/Search/Condition/Recent.php @@ -14,13 +14,13 @@ use Clivern\Imap\Core\Search\Contract\Condition; */ class Recent implements Condition { - /** - * Query String - * - * @return string - */ - public function __toString() - { - return "RECENT"; - } + /** + * Query String + * + * @return string + */ + public function __toString() + { + return "RECENT"; + } } \ No newline at end of file diff --git a/src/Core/Search/Condition/Seen.php b/src/Core/Search/Condition/Seen.php index 56bdbf5..21cd81e 100644 --- a/src/Core/Search/Condition/Seen.php +++ b/src/Core/Search/Condition/Seen.php @@ -14,13 +14,13 @@ use Clivern\Imap\Core\Search\Contract\Condition; */ class Seen implements Condition { - /** - * Query String - * - * @return string - */ - public function __toString() - { - return "SEEN"; - } + /** + * Query String + * + * @return string + */ + public function __toString() + { + return "SEEN"; + } } \ No newline at end of file diff --git a/src/Core/Search/Condition/Since.php b/src/Core/Search/Condition/Since.php index 0da9ffd..0bec57d 100644 --- a/src/Core/Search/Condition/Since.php +++ b/src/Core/Search/Condition/Since.php @@ -15,28 +15,28 @@ use Clivern\Imap\Core\Search\Contract\Condition; class Since implements Condition { - /** - * @var string - */ - protected $data; + /** + * @var string + */ + protected $data; - /** - * Class Constructor - * - * @param string $data - */ - public function __construct($data) - { - $this->data = $data; - } + /** + * Class Constructor + * + * @param string $data + */ + public function __construct($data) + { + $this->data = $data; + } - /** - * Query String - * - * @return string - */ - public function __toString() - { - return "SINCE \"{$this->data}\""; - } + /** + * Query String + * + * @return string + */ + public function __toString() + { + return "SINCE \"{$this->data}\""; + } } \ No newline at end of file diff --git a/src/Core/Search/Condition/Subject.php b/src/Core/Search/Condition/Subject.php index e453157..3d88618 100644 --- a/src/Core/Search/Condition/Subject.php +++ b/src/Core/Search/Condition/Subject.php @@ -15,28 +15,28 @@ use Clivern\Imap\Core\Search\Contract\Condition; class Subject implements Condition { - /** - * @var string - */ - protected $data; + /** + * @var string + */ + protected $data; - /** - * Class Constructor - * - * @param string $data - */ - public function __construct($data) - { - $this->data = $data; - } + /** + * Class Constructor + * + * @param string $data + */ + public function __construct($data) + { + $this->data = $data; + } - /** - * Query String - * - * @return string - */ - public function __toString() - { - return "SUBJECT \"{$this->data}\""; - } + /** + * Query String + * + * @return string + */ + public function __toString() + { + return "SUBJECT \"{$this->data}\""; + } } \ No newline at end of file diff --git a/src/Core/Search/Condition/Text.php b/src/Core/Search/Condition/Text.php index 7620d94..343b836 100644 --- a/src/Core/Search/Condition/Text.php +++ b/src/Core/Search/Condition/Text.php @@ -15,28 +15,28 @@ use Clivern\Imap\Core\Search\Contract\Condition; class Text implements Condition { - /** - * @var string - */ - protected $data; + /** + * @var string + */ + protected $data; - /** - * Class Constructor - * - * @param string $data - */ - public function __construct($data) - { - $this->data = $data; - } + /** + * Class Constructor + * + * @param string $data + */ + public function __construct($data) + { + $this->data = $data; + } - /** - * Query String - * - * @return string - */ - public function __toString() - { - return "TEXT \"{$this->data}\""; - } + /** + * Query String + * + * @return string + */ + public function __toString() + { + return "TEXT \"{$this->data}\""; + } } \ No newline at end of file diff --git a/src/Core/Search/Condition/To.php b/src/Core/Search/Condition/To.php index 6df5c21..f69e8ba 100644 --- a/src/Core/Search/Condition/To.php +++ b/src/Core/Search/Condition/To.php @@ -15,28 +15,28 @@ use Clivern\Imap\Core\Search\Contract\Condition; class To implements Condition { - /** - * @var string - */ - protected $data; + /** + * @var string + */ + protected $data; - /** - * Class Constructor - * - * @param string $data - */ - public function __construct($data) - { - $this->data = $data; - } + /** + * Class Constructor + * + * @param string $data + */ + public function __construct($data) + { + $this->data = $data; + } - /** - * Query String - * - * @return string - */ - public function __toString() - { - return "TO \"{$this->data}\""; - } + /** + * Query String + * + * @return string + */ + public function __toString() + { + return "TO \"{$this->data}\""; + } } \ No newline at end of file diff --git a/src/Core/Search/Condition/UnAnswered.php b/src/Core/Search/Condition/UnAnswered.php index 928e35b..b2ccab3 100644 --- a/src/Core/Search/Condition/UnAnswered.php +++ b/src/Core/Search/Condition/UnAnswered.php @@ -14,13 +14,13 @@ use Clivern\Imap\Core\Search\Contract\Condition; */ class UnAnswered implements Condition { - /** - * Query String - * - * @return string - */ - public function __toString() - { - return "UNANSWERED"; - } + /** + * Query String + * + * @return string + */ + public function __toString() + { + return "UNANSWERED"; + } } \ No newline at end of file diff --git a/src/Core/Search/Condition/UnDeleted.php b/src/Core/Search/Condition/UnDeleted.php index e808e5d..c0d5e0a 100644 --- a/src/Core/Search/Condition/UnDeleted.php +++ b/src/Core/Search/Condition/UnDeleted.php @@ -14,13 +14,13 @@ use Clivern\Imap\Core\Search\Contract\Condition; */ class UnDeleted implements Condition { - /** - * Query String - * - * @return string - */ - public function __toString() - { - return "UNDELETED"; - } + /** + * Query String + * + * @return string + */ + public function __toString() + { + return "UNDELETED"; + } } \ No newline at end of file diff --git a/src/Core/Search/Condition/UnFlagged.php b/src/Core/Search/Condition/UnFlagged.php index 5b9a4d5..89c6e21 100644 --- a/src/Core/Search/Condition/UnFlagged.php +++ b/src/Core/Search/Condition/UnFlagged.php @@ -14,13 +14,13 @@ use Clivern\Imap\Core\Search\Contract\Condition; */ class UnFlagged implements Condition { - /** - * Query String - * - * @return string - */ - public function __toString() - { - return "UNFLAGGED"; - } + /** + * Query String + * + * @return string + */ + public function __toString() + { + return "UNFLAGGED"; + } } \ No newline at end of file diff --git a/src/Core/Search/Condition/UnKeyword.php b/src/Core/Search/Condition/UnKeyword.php index d4d802b..35265fe 100644 --- a/src/Core/Search/Condition/UnKeyword.php +++ b/src/Core/Search/Condition/UnKeyword.php @@ -15,28 +15,28 @@ use Clivern\Imap\Core\Search\Contract\Condition; class UnKeyword implements Condition { - /** - * @var string - */ - protected $data; + /** + * @var string + */ + protected $data; - /** - * Class Constructor - * - * @param string $data - */ - public function __construct($data) - { - $this->data = $data; - } + /** + * Class Constructor + * + * @param string $data + */ + public function __construct($data) + { + $this->data = $data; + } - /** - * Query String - * - * @return string - */ - public function __toString() - { - return "UNKEYWORD \"{$this->data}\""; - } + /** + * Query String + * + * @return string + */ + public function __toString() + { + return "UNKEYWORD \"{$this->data}\""; + } } \ No newline at end of file diff --git a/src/Core/Search/Condition/UnSeen.php b/src/Core/Search/Condition/UnSeen.php index c22b918..37de75e 100644 --- a/src/Core/Search/Condition/UnSeen.php +++ b/src/Core/Search/Condition/UnSeen.php @@ -14,13 +14,13 @@ use Clivern\Imap\Core\Search\Contract\Condition; */ class UnSeen implements Condition { - /** - * Query String - * - * @return string - */ - public function __toString() - { - return "UNSEEN"; - } + /** + * Query String + * + * @return string + */ + public function __toString() + { + return "UNSEEN"; + } } \ No newline at end of file diff --git a/src/Core/Search/Contract/Condition.php b/src/Core/Search/Contract/Condition.php index 25ac432..aa52245 100644 --- a/src/Core/Search/Contract/Condition.php +++ b/src/Core/Search/Contract/Condition.php @@ -12,5 +12,5 @@ namespace Clivern\Imap\Core\Search\Contract; */ interface Condition { - public function __toString(); + public function __toString(); } \ No newline at end of file