IMP_Mailbox_List::getArrayIndex PHP Method

getArrayIndex() public method

Returns the array index of the given message UID.
public getArrayIndex ( integer $uid, string $mbox = null ) : mixed
$uid integer The message UID.
$mbox string The message mailbox (defaults to the current mailbox).
return mixed The array index of the location of the message UID in the current mailbox. Returns null if not found.
    public function getArrayIndex($uid, $mbox = null)
    {
        $this->_buildMailbox();
        /* array_search() returns false on no result. We will set an
         * unsuccessful result to NULL. */
        return ($aindex = array_search($uid, $this->_sorted)) === false ? null : $aindex;
    }