WireApiDocs::getMethod()

Get details about a class method

Returns an array with the following keys:

  • name (string): Method name
  • summary (string): First line of phpdoc (deprecated warning appended when applicable)
  • description (string): Prose description from phpdoc body (may be empty)
  • details (string): Section body from API.md if the method is documented there (may be empty)
  • arguments (array): Each entry has 'name', 'type', 'description', and 'default' (when optional)
  • return (array): 'type' and 'description' keys
  • group (string): Value of * tag if present (may be empty)
  • see (array): Cross-references from

Usage

$array = $wireApiDocs->getMethod(string $class, string $method);

Arguments

NameType(s)Description
$classstring

Class name (with or without ProcessWire namespace)

$methodstring

Method name (triple-underscore prefix optional)

Return value

array

Empty array if class or method not found


WireApiDocs methods and properties

API reference based on ProcessWire core version 3.0.266