@@ -502,20 +502,39 @@ public function idle(callable $callback, int $timeout = 300): void {
502
502
* @throws AuthFailedException
503
503
* @throws ResponseException
504
504
*/
505
- public function getStatus (): array {
505
+ public function status (): array {
506
506
return $ this ->client ->getConnection ()->folderStatus ($ this ->path , ['MESSAGES ' , 'UNSEEN ' , 'RECENT ' , 'UIDNEXT ' , 'UIDVALIDITY ' ])->validatedData ();
507
507
}
508
508
509
509
/**
510
+ * Get folder status information from the EXAMINE command
511
+ *
512
+ * @return array
513
+ * @throws AuthFailedException
510
514
* @throws ConnectionFailedException
511
515
* @throws ImapBadRequestException
512
516
* @throws ImapServerErrorException
517
+ * @throws ResponseException
513
518
* @throws RuntimeException
519
+ *
520
+ * @deprecated Use Folder::status() instead
521
+ */
522
+ public function getStatus (): array {
523
+ return $ this ->status ();
524
+ }
525
+
526
+ /**
527
+ * Load folder status information from the EXAMINE command
528
+ * @return Folder
514
529
* @throws AuthFailedException
530
+ * @throws ConnectionFailedException
531
+ * @throws ImapBadRequestException
532
+ * @throws ImapServerErrorException
515
533
* @throws ResponseException
534
+ * @throws RuntimeException
516
535
*/
517
536
public function loadStatus (): Folder {
518
- $ this ->status = $ this ->getStatus ();
537
+ $ this ->status = $ this ->examine ();
519
538
return $ this ;
520
539
}
521
540
0 commit comments