lol backups and old site first commit

This commit is contained in:
2026-09-06 00:14:06 +02:00
parent 1e8a86873d
commit 56e7e28142
4021 changed files with 1866999 additions and 0 deletions
@@ -0,0 +1,29 @@
<?php
declare (strict_types=1);
namespace WordPress\AiClient\Providers\Http\Contracts;
use WordPress\AiClientDependencies\Psr\Http\Message\RequestInterface;
use WordPress\AiClientDependencies\Psr\Http\Message\ResponseInterface;
use WordPress\AiClient\Providers\Http\DTO\RequestOptions;
/**
* Interface for HTTP clients that support per-request transport options.
*
* Extends the capabilities of PSR-18 clients by allowing custom transport
* configuration such as timeouts and redirect handling on each request.
*
* @since 0.2.0
*/
interface ClientWithOptionsInterface
{
/**
* Sends an HTTP request with the given transport options.
*
* @since 0.2.0
*
* @param RequestInterface $request The PSR-7 request to send.
* @param RequestOptions $options The request transport options. Must not be null.
* @return ResponseInterface The PSR-7 response received.
*/
public function sendRequestWithOptions(RequestInterface $request, RequestOptions $options): ResponseInterface;
}
@@ -0,0 +1,29 @@
<?php
declare (strict_types=1);
namespace WordPress\AiClient\Providers\Http\Contracts;
use WordPress\AiClient\Providers\Http\DTO\Request;
use WordPress\AiClient\Providers\Http\DTO\RequestOptions;
use WordPress\AiClient\Providers\Http\DTO\Response;
/**
* Interface for HTTP transport implementations.
*
* Handles sending HTTP requests and receiving responses using
* PSR-7, PSR-17, and PSR-18 standards internally.
*
* @since 0.1.0
*/
interface HttpTransporterInterface
{
/**
* Sends an HTTP request and returns the response.
*
* @since 0.1.0
*
* @param Request $request The request to send.
* @param RequestOptions|null $options Optional transport options for the request.
* @return Response The response received.
*/
public function send(Request $request, ?RequestOptions $options = null): Response;
}
@@ -0,0 +1,24 @@
<?php
declare (strict_types=1);
namespace WordPress\AiClient\Providers\Http\Contracts;
use WordPress\AiClient\Common\Contracts\WithJsonSchemaInterface;
use WordPress\AiClient\Providers\Http\DTO\Request;
/**
* Interface for HTTP request authentication.
*
* @since 0.1.0
*/
interface RequestAuthenticationInterface extends WithJsonSchemaInterface
{
/**
* Authenticates an HTTP request.
*
* @since 0.1.0
*
* @param Request $request The request to authenticate.
* @return Request The authenticated request.
*/
public function authenticateRequest(Request $request): Request;
}
@@ -0,0 +1,30 @@
<?php
declare (strict_types=1);
namespace WordPress\AiClient\Providers\Http\Contracts;
/**
* Interface for models that require HTTP transport capabilities.
*
* @since 0.1.0
*/
interface WithHttpTransporterInterface
{
/**
* Sets the HTTP transporter.
*
* @since 0.1.0
*
* @param HttpTransporterInterface $transporter The HTTP transporter instance.
* @return void
*/
public function setHttpTransporter(\WordPress\AiClient\Providers\Http\Contracts\HttpTransporterInterface $transporter): void;
/**
* Returns the HTTP transporter.
*
* @since 0.1.0
*
* @return HttpTransporterInterface The HTTP transporter instance.
*/
public function getHttpTransporter(): \WordPress\AiClient\Providers\Http\Contracts\HttpTransporterInterface;
}
@@ -0,0 +1,30 @@
<?php
declare (strict_types=1);
namespace WordPress\AiClient\Providers\Http\Contracts;
/**
* Interface for models that support request authentication.
*
* @since 0.1.0
*/
interface WithRequestAuthenticationInterface
{
/**
* Sets the request authentication.
*
* @since 0.1.0
*
* @param RequestAuthenticationInterface $authentication The authentication instance.
* @return void
*/
public function setRequestAuthentication(\WordPress\AiClient\Providers\Http\Contracts\RequestAuthenticationInterface $authentication): void;
/**
* Returns the request authentication.
*
* @since 0.1.0
*
* @return RequestAuthenticationInterface The authentication instance.
*/
public function getRequestAuthentication(): \WordPress\AiClient\Providers\Http\Contracts\RequestAuthenticationInterface;
}