Proje dosyaları eklendi

This commit is contained in:
2026-08-29 15:53:53 +03:00
commit d3313400ca
440 changed files with 24827 additions and 0 deletions
@@ -0,0 +1,16 @@
<?php
namespace App\Serp\Exceptions;
class PermanentProviderException extends SerpProviderException
{
public function retryable(): bool
{
return false;
}
public function safeCode(): string
{
return 'provider_rejected';
}
}
@@ -0,0 +1,11 @@
<?php
namespace App\Serp\Exceptions;
class ProviderAuthenticationException extends PermanentProviderException
{
public function safeCode(): string
{
return 'provider_configuration_error';
}
}
@@ -0,0 +1,16 @@
<?php
namespace App\Serp\Exceptions;
class ProviderConfigurationException extends PermanentProviderException
{
public function safeCode(): string
{
return 'provider_not_configured';
}
public function safeMessage(): string
{
return 'SERP kontrol hizmeti henüz yapılandırılmamış.';
}
}
@@ -0,0 +1,11 @@
<?php
namespace App\Serp\Exceptions;
class ProviderRateLimitException extends TransientProviderException
{
public function safeCode(): string
{
return 'provider_rate_limited';
}
}
@@ -0,0 +1,11 @@
<?php
namespace App\Serp\Exceptions;
class ProviderTimeoutException extends TransientProviderException
{
public function safeCode(): string
{
return 'provider_timeout';
}
}
@@ -0,0 +1,17 @@
<?php
namespace App\Serp\Exceptions;
use RuntimeException;
abstract class SerpProviderException extends RuntimeException
{
abstract public function retryable(): bool;
abstract public function safeCode(): string;
public function safeMessage(): string
{
return 'SERP kontrolü şu anda tamamlanamadı.';
}
}
@@ -0,0 +1,16 @@
<?php
namespace App\Serp\Exceptions;
class TransientProviderException extends SerpProviderException
{
public function retryable(): bool
{
return true;
}
public function safeCode(): string
{
return 'provider_transient';
}
}
@@ -0,0 +1,11 @@
<?php
namespace App\Serp\Exceptions;
class UnexpectedProviderResponseException extends PermanentProviderException
{
public function safeCode(): string
{
return 'provider_invalid_response';
}
}