ToolScanner
Scans classes for #[Tool] attributes and auto-registers them.
ToolScanner::__construct()
public function __construct(Milpa\Interfaces\Tooling\ToolRegistryInterface $registry):Parameters
| Name | Type | Description |
|---|---|---|
| $registry | Milpa\Interfaces\Tooling\ToolRegistryInterface |
ToolScanner::scan()
public function scan(object $service): intScan a tool service for #[Tool] attributed methods.
Parameters
| Name | Type | Description |
|---|---|---|
| $service | object | Instance of a tool service class |
Returns
Number of tools registered