Skip to content

Commit 0bd96d1

Browse files
committed
getStatus() deprecated
1 parent b8ce799 commit 0bd96d1

File tree

1 file changed

+21
-2
lines changed

1 file changed

+21
-2
lines changed

src/Folder.php

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -502,20 +502,39 @@ public function idle(callable $callback, int $timeout = 300): void {
502502
* @throws AuthFailedException
503503
* @throws ResponseException
504504
*/
505-
public function getStatus(): array {
505+
public function status(): array {
506506
return $this->client->getConnection()->folderStatus($this->path, ['MESSAGES', 'UNSEEN', 'RECENT', 'UIDNEXT', 'UIDVALIDITY'])->validatedData();
507507
}
508508

509509
/**
510+
* Get folder status information from the EXAMINE command
511+
*
512+
* @return array
513+
* @throws AuthFailedException
510514
* @throws ConnectionFailedException
511515
* @throws ImapBadRequestException
512516
* @throws ImapServerErrorException
517+
* @throws ResponseException
513518
* @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
514529
* @throws AuthFailedException
530+
* @throws ConnectionFailedException
531+
* @throws ImapBadRequestException
532+
* @throws ImapServerErrorException
515533
* @throws ResponseException
534+
* @throws RuntimeException
516535
*/
517536
public function loadStatus(): Folder {
518-
$this->status = $this->getStatus();
537+
$this->status = $this->examine();
519538
return $this;
520539
}
521540

0 commit comments

Comments
 (0)