[ Index ]

PHP Cross Reference of WordPress Trunk (Updated Daily)

Search

title

Body

[close]

/wp-includes/php-ai-client/src/Providers/ApiBasedImplementation/ -> AbstractApiProvider.php (summary)

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.

File Size: 49 lines (2 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 function

  url()

Functions
Functions that are not part of a class:

url(string $path = '')   X-Ref
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

return: string The complete URL.
param: string $path Optional path to append to the base URL. Default empty string.



Generated : Sun Jul 5 08:20:13 2026 Cross-referenced by PHPXref