| @@ 511-519 (lines=9) @@ | ||
| 508 | * get a list of messages with number and size |
|
| 509 | * @param int $uid number of message |
|
| 510 | */ |
|
| 511 | public function getSize($cb, $uid = null) |
|
| 512 | { |
|
| 513 | $this->onResponse->push($cb); |
|
| 514 | if ($uid) { |
|
| 515 | $this->fetch('RFC822.SIZE', $uid, null, true, self::TAG_SIZE); |
|
| 516 | } else { |
|
| 517 | $this->fetch('RFC822.SIZE', 1, INF, true, self::TAG_SIZE); |
|
| 518 | } |
|
| 519 | } |
|
| 520 | ||
| 521 | /** |
|
| 522 | * Fetch a message |
|
| @@ 557-565 (lines=9) @@ | ||
| 554 | * |
|
| 555 | * @param int|null $id message number |
|
| 556 | */ |
|
| 557 | public function getUniqueId($cb, $id = null) |
|
| 558 | { |
|
| 559 | $this->onResponse->push($cb); |
|
| 560 | if ($id) { |
|
| 561 | $this->fetch('UID', $id, null, false, self::TAG_GETUID); |
|
| 562 | } else { |
|
| 563 | $this->fetch('UID', 1, INF, false, self::TAG_GETUID); |
|
| 564 | } |
|
| 565 | } |
|
| 566 | ||
| 567 | /** |
|
| 568 | * create a new folder (and parent folders if needed) |
|