Return a message based on its index in the mailbox.

@param string $id

@return mixed
3440
public function getMessage($id = '')
    {
        $message = [];
        if (is_array($this->messages) == true) {
            foreach($this ->messages as $msg) {
                if ($msg['index'] == $id) {
                    $message = $msg;
                    break;
                }
            }
        }

        if (is_array($message) === true) {
            // Get the message body but do not mark as read
            $message['body'] = quoted_printable_decode(imap_fetchbody($this->conn, $message['index'], FT_PEEK));
        }

        return $message;
    }
1131465
public function archiveMessage(int $id): PodiumResponse
    {
        return $this->getPodium()->message->archive($id, $this->ensureMembership());
    }
1072588
protected function getValidationMessage($id)
    {
        switch ($id) {
            case 'scheme-required':
                $text = sprintf(
                    Swat::_('“%s” must include a prefix (i.e. %s).'),
                    $this->value,
                    $this->default_scheme
                );

                break;
            case 'invalid-uri':
                $text = sprintf(
                    Swat::_('“%s” is not a properly formatted address.'),
                    $this->value
                );

                break;
            default:
                return parent::getValidationMessage($id);
        }

        $message = new SwatMessage($text, 'error');
        return $message;
    }
132009
public function get($id)
    {
        $response = $this->mailjet->get(Resources::$Template, ['id' => $id]);
        if (!$response->success()) {
            $this->throwError("TemplateService:get() failed", $response);
        }

        return $response->getData();
    }
450849
public static function get_handler_from_id($id) {
        global $DB;

        $record = $DB->get_record('messageinbound_handlers', array('id' => $id), '*', IGNORE_MISSING);
        if (!$record) {
            return false;
        }
        return self::handler_from_record($record);
    }
1191843
protected function _getPos($id)
    {
        if (!isset($this->_positions[$id - 1])) {
            /**
             * @see Zend_Mail_Storage_Exception
             */
            // require_once 'Zend/Mail/Storage/Exception.php';
            throw new Zend_Mail_Storage_Exception('id does not exist');
        }

        return $this->_positions[$id - 1];
    }
685226
public function get($id)
    {
        return $this->_sendPayload(
            $this->_getService($this->_pageServiceKey)->getTemplateLayout($id)
        );
    }
1328147
public function get($id) {
        $id=($id==='')?"0":$id;
        if (!isset($this->items[$id])) {
            return new MessageItem(); // we returns an empty error.
        }
        return $this->items[$id];
    }
928696
private function checkMessageId($id)
    {
        if(!is_int($id)){
            throw new ImapClientException('$id must be an integer!');
        };
        if($id <= 0){
            throw new ImapClientException('$id must be greater then 0!');
        };
        if($id > $this->countMessages()){
            throw new ImapClientException('$id does not exist');
        }
    }
457027
public function getMessage($id)
    {
        $header = $this->_protocol->top($id);
        $message = $this->_protocol->retrieve($id);

        return new Message($header, $message, $id);
    }
1170043
private function getNotification($id)
    {
        /** @var Notification $notification */
        $class = $this->notificationClass;
        $notification = $class::findOne($id);
        if (!$notification) {
            throw new HttpException(404, "Unknown notification");
        }

        if ($notification->user_id != $this->user_id) {
            throw new HttpException(500, "Not your notification");
        }

        return $notification;
    }
590268
public function get($id)
    {
        foreach ($this->items as $item) {
            if ($item->id === $id) {
                return $item;
            }
        }
        return null;
    }
666882
public function getContactById($id)
    {
        $url = $this->getApiEndpoint() . self::REST_CONTACTS . $id;
        $this->setUrl($url)
            ->setVerb('GET');

        $response = $this->execute();

        if (isset($response->message)) {
            $message = 'GET CONTACT INFO ID ' . $url . ', ' . $response->message;
            $this->helper->debug('getContactById', [$message]);
        }

        return $response;
    }
809782
function get( $id )
    {
        $params = [
            'index' => $this->config->index,
            'type' => $this->config->type,
            'id' => $id,
        ];

        $response = $this->client->get($params);
        return $response['_source'];
    }
1197770
public function get($id)
    {
        $idName = ucfirst($this->idProperty->getName());
        return $this->__call("getBy$idName", array($id));
    }
455047
public function get($id)
    {
        $entry = $this->readFile($id);
        if ($entry != false && $this->isTtlMode()) {
            $entry = (is_null($entry[static::ENTRY_EXPIRATION]) || $entry[static::ENTRY_EXPIRATION] > $this->getTime())
                ? $entry[static::ENTRY_VALUE]
                : false
            ;
        }
        return $entry;
    }
615448
public function show($id)
    {
        $inbox = $this->client->get(
            sprintf('buckets/%d/inboxes/%d.json', $this->bucket, $id)
        );

        return new Inbox($this->response($inbox));
    }