本文整理汇总了PHP中PhabricatorApplication::getPHID方法的典型用法代码示例。如果您正苦于以下问题:PHP PhabricatorApplication::getPHID方法的具体用法?PHP PhabricatorApplication::getPHID怎么用?PHP PhabricatorApplication::getPHID使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PhabricatorApplication
的用法示例。
在下文中一共展示了PhabricatorApplication::getPHID方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: canAcceptApplicationMail
protected final function canAcceptApplicationMail(PhabricatorApplication $app, PhabricatorMetaMTAReceivedMail $mail)
{
$application_emails = id(new PhabricatorMetaMTAApplicationEmailQuery())->setViewer($this->getViewer())->withApplicationPHIDs(array($app->getPHID()))->execute();
foreach ($mail->getToAddresses() as $to_address) {
foreach ($application_emails as $application_email) {
$create_address = $application_email->getAddress();
if ($this->matchAddresses($create_address, $to_address)) {
$this->setApplicationEmail($application_email);
return true;
}
}
}
return false;
}
示例2: returnNewAddressResponse
private function returnNewAddressResponse(AphrontRequest $request, PhutilURI $uri, PhabricatorApplication $application)
{
$viewer = $request->getUser();
$email_object = PhabricatorMetaMTAApplicationEmail::initializeNewAppEmail($viewer)->setApplicationPHID($application->getPHID());
return $this->returnSaveAddressResponse($request, $uri, $email_object, $is_new = true);
}