[ Index ]

PHP Cross Reference of WordPress Trunk (Updated Daily)

Search

title

Body

[close]

/wp-includes/php-ai-client/src/Tools/DTO/ -> FunctionDeclaration.php (summary)

(no description)

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

Defines 1 class

FunctionDeclaration:: (7 methods):
  __construct()
  getName()
  getDescription()
  getParameters()
  getJsonSchema()
  toArray()
  fromArray()


Class: FunctionDeclaration  - X-Ref

Represents a function declaration for AI models.

This DTO describes a function that can be called by the AI model,
including its name, description, and parameter schema.

__construct(string $name, string $description, ?array $parameters = null)   X-Ref
Constructor.

param: string $name The name of the function.
param: string $description A description of what the function does.
param: array<string, mixed>|null $parameters The JSON schema for the function parameters.

getName()   X-Ref
Gets the function name.

return: string The function name.

getDescription()   X-Ref
Gets the function description.

return: string The function description.

getParameters()   X-Ref
Gets the function parameters schema.

return: array<string, mixed>|null The parameters schema.

getJsonSchema()   X-Ref
{@inheritDoc}


toArray()   X-Ref
{@inheritDoc}

return: FunctionDeclarationArrayShape

fromArray(array $array)   X-Ref
{@inheritDoc}




Generated : Sat Jun 13 09:38:55 2026 Cross-referenced by PHPXref