mirror of
https://github.com/shlinkio/shlink.git
synced 2026-03-12 01:54:41 +08:00
Added option to automatically resolve url titles
This commit is contained in:
@@ -167,4 +167,17 @@ final class ShortUrlMeta
|
||||
{
|
||||
return $this->title;
|
||||
}
|
||||
|
||||
public function hasTitle(): bool
|
||||
{
|
||||
return $this->title !== null;
|
||||
}
|
||||
|
||||
public function withResolvedTitle(?string $title): self
|
||||
{
|
||||
$copy = clone $this;
|
||||
$copy->title = $title;
|
||||
|
||||
return $copy;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user