From 545489ee107adc7b300a7436793a81f0ff96020a Mon Sep 17 00:00:00 2001 From: Ben Roberts Date: Fri, 27 Mar 2015 06:53:52 +0100 Subject: [PATCH 1/3] Added method to access mailbox properties --- src/Fetch/Server.php | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/src/Fetch/Server.php b/src/Fetch/Server.php index 1af1807..23b8459 100644 --- a/src/Fetch/Server.php +++ b/src/Fetch/Server.php @@ -443,13 +443,25 @@ class Server */ public function hasMailBox($mailbox) { - return (boolean) imap_getmailboxes( - $this->getImapStream(), - $this->getServerString(), - $this->getServerSpecification() . $mailbox - ); + return (boolean) $this->getMailBoxDetails($mailbox); } + /** + * Return information about the mailbox or mailboxes + * + * @param $mailbox + * + * @return bool + */ + public function getMailBoxDetails($mailbox) + { + return imap_getmailboxes( + $this->getImapStream(), + $this->getServerString(), + $this->getServerSpecification() . $mailbox + ); + } + /** * Creates the given mailbox. * From ec9c2ff671357ae1e68a0da1ebabb868ddfeda25 Mon Sep 17 00:00:00 2001 From: Ben Roberts Date: Tue, 12 May 2015 14:22:24 +0200 Subject: [PATCH 2/3] Fixed indentation --- src/Fetch/Server.php | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/src/Fetch/Server.php b/src/Fetch/Server.php index 23b8459..5aa684f 100644 --- a/src/Fetch/Server.php +++ b/src/Fetch/Server.php @@ -446,21 +446,21 @@ class Server return (boolean) $this->getMailBoxDetails($mailbox); } - /** - * Return information about the mailbox or mailboxes - * - * @param $mailbox - * - * @return bool - */ - public function getMailBoxDetails($mailbox) - { - return imap_getmailboxes( - $this->getImapStream(), - $this->getServerString(), - $this->getServerSpecification() . $mailbox - ); - } + /** + * Return information about the mailbox or mailboxes + * + * @param $mailbox + * + * @return bool + */ + public function getMailBoxDetails($mailbox) + { + return imap_getmailboxes( + $this->getImapStream(), + $this->getServerString(), + $this->getServerSpecification() . $mailbox + ); + } /** * Creates the given mailbox. From 1c526b989ba075bb376d164109046792c9e425a6 Mon Sep 17 00:00:00 2001 From: Ben Roberts Date: Tue, 12 May 2015 14:30:03 +0200 Subject: [PATCH 3/3] Fixed indentation --- src/Fetch/Server.php | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/Fetch/Server.php b/src/Fetch/Server.php index 5aa684f..32ad021 100644 --- a/src/Fetch/Server.php +++ b/src/Fetch/Server.php @@ -446,21 +446,21 @@ class Server return (boolean) $this->getMailBoxDetails($mailbox); } - /** - * Return information about the mailbox or mailboxes - * - * @param $mailbox - * - * @return bool - */ - public function getMailBoxDetails($mailbox) - { + /** + * Return information about the mailbox or mailboxes + * + * @param $mailbox + * + * @return bool + */ + public function getMailBoxDetails($mailbox) + { return imap_getmailboxes( $this->getImapStream(), $this->getServerString(), $this->getServerSpecification() . $mailbox ); - } + } /** * Creates the given mailbox.