55 lines
1.2 KiB
PHP
55 lines
1.2 KiB
PHP
<?php
|
|
namespace Uiharu\Lookup;
|
|
|
|
use RuntimeException;
|
|
use Uiharu\Url;
|
|
use Index\MediaType;
|
|
|
|
class WebLookupFallbackResult extends WebLookupResult {
|
|
private string $title;
|
|
|
|
public function __construct(Url $url, MediaType $mediaType, string $title) {
|
|
parent::__construct($url, $mediaType);
|
|
$this->title = $title;
|
|
}
|
|
|
|
public function getObjectType(): string {
|
|
return 'unknown';
|
|
}
|
|
|
|
public function hasColour(): bool {
|
|
return false;
|
|
}
|
|
public function getColour(): int {
|
|
throw new RuntimeException('Unsupported.');
|
|
}
|
|
|
|
public function hasTitle(): bool {
|
|
return true;
|
|
}
|
|
public function getTitle(): string {
|
|
return $this->title;
|
|
}
|
|
|
|
public function hasSiteName(): bool {
|
|
return false;
|
|
}
|
|
public function getSiteName(): string {
|
|
throw new RuntimeException('Unsupported.');
|
|
}
|
|
|
|
public function hasDescription(): bool {
|
|
return false;
|
|
}
|
|
public function getDescription(): string {
|
|
throw new RuntimeException('Unsupported.');
|
|
}
|
|
|
|
public function hasPreviewImage(): bool {
|
|
return false;
|
|
}
|
|
public function getPreviewImage(): string {
|
|
throw new RuntimeException('Unsupported.');
|
|
}
|
|
}
|