mirror of
https://github.com/shlinkio/shlink.git
synced 2026-03-10 17:23:12 +08:00
Exposed domain on short URLs
This commit is contained in:
@@ -4,9 +4,10 @@ declare(strict_types=1);
|
||||
|
||||
namespace Shlinkio\Shlink\Core\Entity;
|
||||
|
||||
use JsonSerializable;
|
||||
use Shlinkio\Shlink\Common\Entity\AbstractEntity;
|
||||
|
||||
class Domain extends AbstractEntity
|
||||
class Domain extends AbstractEntity implements JsonSerializable
|
||||
{
|
||||
private string $authority;
|
||||
|
||||
@@ -19,4 +20,9 @@ class Domain extends AbstractEntity
|
||||
{
|
||||
return $this->authority;
|
||||
}
|
||||
|
||||
public function jsonSerialize(): string
|
||||
{
|
||||
return $this->getAuthority();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -69,6 +69,11 @@ class ShortUrl extends AbstractEntity
|
||||
return $this->dateCreated;
|
||||
}
|
||||
|
||||
public function getDomain(): ?Domain
|
||||
{
|
||||
return $this->domain;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return Collection|Tag[]
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user