Revert "Revert "Release 20200823.1100""

This reverts commit 1b5f690f4e.
This commit is contained in:
shibafu
2020-08-30 13:57:02 +09:00
parent 46449a2836
commit 407fd192bd
71 changed files with 4372 additions and 1200 deletions

View File

@@ -0,0 +1,30 @@
<?php
namespace App\MetadataResolver;
use RuntimeException;
use Throwable;
/**
* ContentProviderの提供するrobots.txtによってクロールが拒否された場合にスローされます。
*/
class DisallowedByProviderException extends RuntimeException
{
private $url;
public function __construct(string $url, Throwable $previous = null)
{
parent::__construct("Access denied by robots.txt: $url", 0, $previous);
$this->url = $url;
}
public function getUrl(): string
{
return $this->url;
}
public function getHost(): string
{
return parse_url($this->url, PHP_URL_HOST);
}
}