@param $boxId
@param $messageId
@param $entityId

@return mixed
546456
public function getEntityContent($boxId, $messageId, $entityId)
    {
        $response = $this->doRequest(
            self::RESOURCE_GET_ENTITY_CONTENT,
            [
                'boxId' =>  $boxId,
                'messageId' =>  $messageId,
                'entityId'  =>  $entityId
            ]
        );

        return $response;
    }
334954
public function GetID($MessageID) {
      if (Gdn::Cache()->ActiveEnabled())
         return self::Messages($MessageID);
      else
         return parent::GetID($MessageID);
   }
80316
protected function generateMessageTemplate($messageID) {
		$subject = $this->getConfigSetting('PipelineConfig', 'Subjects', $messageID);
		$message = $this->getConfigSetting('PipelineConfig', 'Messages',  $messageID);
		$substitutions = $this->getReplacements();
		return $this->injectMessageReplacements($message, $subject, $substitutions);
	}
784975
public function delete($entityId)
    {
        $response = $this->client->delete(sprintf('/entities/%s', $entityId));

        return $this->decodeResponse($response);
    }
942169
public function getMessage($messageId)
    {
        $this->buildCall('/get-sms-status/'.$messageId);

        return $this->makeMessage(json_decode($this->getRequest()->getBody()->getContents()));
    }
532319
public function getEntity($entityId)
    {
        if (isset($this->entities[$entityId])) {
            return $this->entities[$entityId];
        }

        $this->entities[$entityId] = $this->client->getEntity($entityId);

        return $this->entities[$entityId];
    }
588038
public function revertEntityId($entityId) {
        if (0 === strpos($entityId, 'HLBLOCK_')) {
            $hlblockName = substr($entityId, 8);
            $hlhelper = new HlblockHelper();
            $hlblock = $hlhelper->getHlblock($hlblockName);
            if (empty($hlblock)) {
                $this->throwException(__METHOD__, '%s not found', $entityId);
            }

            $entityId = 'HLBLOCK_' . $hlblock['ID'];
        }

        return $entityId;
    }
922944
public function setMessageId($messageId)
    {
        if (is_integer($messageId) || is_float($messageId)) {
            $this->messageId = $messageId;
        } else {
            throw new InvalidArgumentException();
        }
    }
678043
public function send($mobile, $message, $messageId = null) {
    // Create message
    $message = $this->createMessage([
      'id'      => $messageId,
      'mobile'  => $mobile,
      'message' => $message,
    ]);
    // Return sender response
    return Loader::sender($this->config)->send($message);
  }
1342172
public function iGetEntityWithId($entityId)
    {
        $this->lastEntity = $this->entity;
        $this->entity = $this->repository->get($entityId);
    }
1145818
public function get_quote_pm($messageId)
    {
        try {
            $manager = $this->container->get('symbb.extension.tapatalk.manager.user');
            return $manager->getQuotePm($messageId);
        } catch (\Exception $exc) {
            return $this->errorResponse($exc);
        }
    }
488921
public function getMessage($messageId)
    {
        $rawMessage = $this->plivo->get_message(['record_id' => $messageId]);
        $incomingMessage = $this->createIncomingMessage();
        $this->processReceive($incomingMessage, $rawMessage);

        return $incomingMessage;
    }
208611
public function getMessageIds(?string $blockId = null): GetMessageIdsResponse
    {
        $command = new GetMessageIdsCommand($blockId);
        $response = $this->driver->executeCommand($command);

        return new GetMessageIdsResponse($response->getRawData());
    }
379410
public function edit($entityId)
    {
        $entity = $this->show($entityId);
        $form = $this->getForm();
        $this->set(compact('form'));
        
        if (!$entity instanceof EntityInterface) {
            return;
        }

        $form->setData($entity->asArray());
        
        if (!$form->wasSubmitted()) {
            return;
        }

        try {
            $this->getUpdateService()
                ->setEntity($entity)
                ->setForm($form)
                ->update();
            ;
        } catch (InvalidFormDataException $caught) {
            Log::logger()->addNotice($caught->getMessage(), $form->getData());
            $this->addErrorMessage($this->getInvalidFormDataMessage());
            return;
        } catch (\Exception $caught) {
            Log::logger()->addCritical(
                $caught->getMessage(),
                $form->getData()
            );
            $this->addErrorMessage($this->getGeneralErrorMessage($caught));
            return;
        }

        $this->addSuccessMessage(
            $this->getEditSuccessMessage($this->getUpdateService()->getEntity())
        );
        $this->redirectFromEdit($entity);
    }
82674
public function findById($entityId)
    {
        $this->adapter->select($this->entityTable, "id = {$entityId}");

        if (($data = $this->adapter->fetch()) !== false) {
            return $this->createEntity($data);
        }

        return null;
    }
1258237
public function getMail($mailId, $markAsSeen = true) {
		$head = imap_rfc822_parse_headers(imap_fetchheader($this->getImapStream(), $mailId, FT_UID));

		$mail = new IncomingMail();
		$mail->id = $mailId;
        $mail->date = self::getDateTime($head->date);
		$mail->subject = isset($head->subject) ? $this->decodeMimeStr($head->subject, $this->serverEncoding) : null;
		$mail->fromName = isset($head->from[0]->personal) ? $this->decodeMimeStr($head->from[0]->personal, $this->serverEncoding) : null;
		$mail->fromAddress = strtolower($head->from[0]->mailbox . '@' . $head->from[0]->host);

		if(isset($head->to)) {
			$toStrings = array();
			foreach($head->to as $to) {
				if(!empty($to->mailbox) && !empty($to->host)) {
					$toEmail = strtolower($to->mailbox . '@' . $to->host);
					$toName = isset($to->personal) ? $this->decodeMimeStr($to->personal, $this->serverEncoding) : null;
					$toStrings[] = $toName ? "$toName <$toEmail>" : $toEmail;
					$mail->to[$toEmail] = $toName;
				}
			}
			$mail->toString = implode(', ', $toStrings);
		}

		if(isset($head->cc)) {
			foreach($head->cc as $cc) {
				$mail->cc[strtolower($cc->mailbox . '@' . $cc->host)] = isset($cc->personal) ? $this->decodeMimeStr($cc->personal, $this->serverEncoding) : null;
			}
		}

		if(isset($head->reply_to)) {
			foreach($head->reply_to as $replyTo) {
				$mail->replyTo[strtolower($replyTo->mailbox . '@' . $replyTo->host)] = isset($replyTo->personal) ? $this->decodeMimeStr($replyTo->personal, $this->serverEncoding) : null;
			}
		}

		$mailStructure = imap_fetchstructure($this->getImapStream(), $mailId, FT_UID);

		if(empty($mailStructure->parts)) {
			$this->initMailPart($mail, $mailStructure, 0, $markAsSeen);
		}
		else {
			foreach($mailStructure->parts as $partNum => $partStructure) {
				$this->initMailPart($mail, $partStructure, $partNum + 1, $markAsSeen);
			}
		}

		return $mail;
	}
702126
public static function createMultiple(?array $messageEntityArray): ?array
    {
        if (is_array($messageEntityArray)) {
            return array_map(function (array $messageEntityData) {
                return new self($messageEntityData);
            }, $messageEntityArray);
        }

        return null;
    }