POP3::last()publicWP 1.0

Метод класса: POP3{}

Хуков нет.

Возвращает

null. Ничего (null).

Использование

$POP3 = new POP3();
$POP3->last ( $type );
$type **
-
По умолчанию: "count"

Код POP3::last() WP 6.6.2

function last ( $type = "count" ) {
    //  Returns the highest msg number in the mailbox.
    //  returns -1 on error, 0+ on success, if type != count
    //  results in a popstat() call (2 element array returned)

    $last = -1;
    if(!isset($this->FP))
    {
        $this->ERROR = "POP3 last: " . _("No connection to server");
        return $last;
    }

    $reply = $this->send_cmd("STAT");
    if(!$this->is_ok($reply))
    {
        $this->ERROR = "POP3 last: " . _("Error ") . "[$reply]";
        return $last;
    }

    $Vars = preg_split('/\s+/',$reply);
    $count = $Vars[1];
    $size = $Vars[2];
    settype($count,"integer");
    settype($size,"integer");
    if($type != "count")
    {
        return array($count,$size);
    }
    return $count;
}