REDROOM
PHP 8.2.31
Path:
Logout
Edit File
Size: 1.50 KB
Close
/home/nshryvcy/blissfulnepal.com/wp-includes/php-ai-client/src/Providers/ApiBasedImplementation/AbstractApiProvider.php
Text
Base64
<?php declare (strict_types=1); namespace WordPress\AiClient\Providers\ApiBasedImplementation; use WordPress\AiClient\Providers\AbstractProvider; /** * Base class for API-based providers. * * This abstract class provides URL construction utilities for providers that * communicate with REST APIs. It standardizes the pattern of combining a base * URL with endpoint paths. * * @since 0.2.0 */ abstract class AbstractApiProvider extends AbstractProvider { /** * Gets the base URL for the provider's API. * * The base URL should include the protocol and domain, and may include * the API version path (e.g., "https://api.example.com/v1"). * * @since 0.2.0 * * @return string The base URL for the provider's API. */ abstract protected static function baseUrl(): string; /** * Constructs a full URL by combining the base URL with an optional path. * * This method ensures proper URL construction by: * - Using the provider's base URL * - Trimming leading slashes from the path to prevent double-slashes * - Joining the base URL and path with a single forward slash * * @since 0.2.0 * * @param string $path Optional path to append to the base URL. Default empty string. * @return string The complete URL. */ public static function url(string $path = ''): string { if ($path === '') { return static::baseUrl(); } return static::baseUrl() . '/' . ltrim($path, '/'); } }
Save
Close
Exit & Reset
Text mode: syntax highlighting auto-detects file type.
Directory Contents
Dirs: 1 × Files: 5
Delete Selected
Select All
Select None
Sort:
Name
Size
Modified
Enable drag-to-move
Name
Size
Perms
Modified
Actions
Contracts
DIR
-
drwxr-xr-x
2026-05-21 08:23:01
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
AbstractApiBasedModel.php
3.15 KB
lrw-r--r--
2026-05-21 08:23:01
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
AbstractApiBasedModelMetadataDirectory.php
3.24 KB
lrw-r--r--
2026-05-21 08:23:01
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
AbstractApiProvider.php
1.50 KB
lrw-r--r--
2026-05-21 08:23:01
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
GenerateTextApiBasedProviderAvailability.php
2.31 KB
lrw-r--r--
2026-05-21 08:23:01
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
ListModelsApiBasedProviderAvailability.php
1.76 KB
lrw-r--r--
2026-05-21 08:23:01
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Zip Selected
If ZipArchive is unavailable, a
.tar
will be created (no compression).