How to use this prompt
How to use this prompt
Copy the full prompt below and send it to an AI assistant (like ChatGPT or another capable LLM), together with the source code of a PHP service class. The assistant will then generate a JSON file that describes the service and its public methods in a structured format. This format is used to document service-oriented PHP frameworks in this repository.
Make sure to include both the prompt and the complete PHP class code in your request to the assistant.
Please analyze the following PHP service class and generate a structured JSON description for it. The goal is to document the service and its public API in a machine-readable format that can be included in an open source catalog of PHP service-oriented frameworks.
The expected output is a single JSON object with the following structure:
{
"type": "Fully\Qualified\Interface\Name",
"description": "A short and general description of what this service does.",
"methods": [
{
"signature": "methodName(type1 $param1, type2 $param2, ...): returnType",
"description": "A general explanation of what this method does, phrased as if it were part of an abstract interface."
}
]
}
Instructions:
Set "type" to the interface (or base class) implemented by the service.
Provide a short, neutral "description" that describes the purpose of the service in general terms.
For each public method:
Include its full signature using parameter types, names, and return type.
Write a concise "description" of the method's purpose. Do not mention implementation specifics (e.g. file system, MySQL, etc.), and do not refer to the method as being part of a specific class or backend.
Only include public methods.
Use ?type or = null for optional parameters.
The JSON must be valid, compact and readable.
Do not include explanations, headings or formatting. Just return the JSON object.