Added option to automatically resolve url titles

This commit is contained in:
Alejandro Celaya
2021-02-03 11:07:47 +01:00
parent 356e68ca3e
commit 8b54098299
7 changed files with 68 additions and 7 deletions

View File

@@ -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;
}
}