mirror of
https://github.com/flarum/core.git
synced 2025-07-17 14:51:19 +02:00
Add a docblock
This commit is contained in:
@@ -38,6 +38,15 @@ final class BaseUrl
|
|||||||
return $this->normalized;
|
return $this->normalized;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Generate a valid e-mail address for this base URL's domain.
|
||||||
|
*
|
||||||
|
* This uses the given mailbox name and our already normalized host name to
|
||||||
|
* construct an email address.
|
||||||
|
*
|
||||||
|
* @param string $mailbox
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
public function toEmail(string $mailbox): string
|
public function toEmail(string $mailbox): string
|
||||||
{
|
{
|
||||||
$host = preg_replace('/^www\./i', '', parse_url($this->normalized, PHP_URL_HOST));
|
$host = preg_replace('/^www\./i', '', parse_url($this->normalized, PHP_URL_HOST));
|
||||||
|
Reference in New Issue
Block a user