Skip to content
docsv0.2.0

ToolScanner

Scans classes for #[Tool] attributes and auto-registers them.

ToolScanner::__construct()

public function __construct(Milpa\Interfaces\Tooling\ToolRegistryInterface $registry):

Parameters

Parameters of __construct()
NameTypeDescription
$registryMilpa\Interfaces\Tooling\ToolRegistryInterface

ToolScanner::scan()

public function scan(object $service): int

Scan a tool service for #[Tool] attributed methods.

Parameters

Parameters of scan()
NameTypeDescription
$serviceobjectInstance of a tool service class

Returns

Number of tools registered