Skip to content

Commit 1d72d99

Browse files
committed
Aggiunge override del metodo getMessageByUid
In questo modo posso restituire un oggetto PecMessage
1 parent 517d914 commit 1d72d99

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

src/PhpPec/PecServer.php

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,4 +82,21 @@ public function getMessages($limit = null)
8282

8383
return $messages;
8484
}
85+
86+
/**
87+
* Returns the requested email or false if it is not found.
88+
*
89+
* @param int $uid
90+
* @return PecMessage|bool
91+
*/
92+
public function getMessageByUid($uid)
93+
{
94+
try {
95+
$message = new PecMessage($uid, $this);
96+
97+
return $message;
98+
} catch (\Exception $e) {
99+
return false;
100+
}
101+
}
85102
}

0 commit comments

Comments
 (0)