mirror of
https://github.com/flarum/framework.git
synced 2025-02-02 04:43:17 +08:00
Add a docblock
This commit is contained in:
parent
22c599b283
commit
36d6d79011
|
@ -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));
|
||||||
|
|
Loading…
Reference in New Issue
Block a user