ProvidersService
API reference › Scaffold › Services › ProvidersService
Lists scaffold providers recorded in scaffold-lock.json with their file counts.
Methods
Section titled “Methods”| Method | Description | Defined by |
|---|---|---|
getProviders() | Returns the number of tracked files of every provider recorded in scaffold-lock.json under $projectRoot. | ProvidersService |
run() | Renders the providers table for the project rooted at $projectRoot. | ProvidersService |
Method details
Section titled “Method details”getProviders()
Section titled “getProviders() ”public function getProviders(string $projectRoot): array<string, int>Returns the number of tracked files of every provider recorded in scaffold-lock.json under $projectRoot.
Parameters
| Parameter | Type | Description |
|---|---|---|
$projectRoot | string | Absolute path to the project root. |
Returns
array<string, int>: Map of provider package names to the number of files tracked for them.
Throws
RuntimeException: when the lock file cannot be read.
run()
Section titled “run() ”public function run(string $projectRoot, PHPForge\Scaffold\Console\OutputWriter $out): intRenders the providers table for the project rooted at $projectRoot.
Parameters
| Parameter | Type | Description |
|---|---|---|
$projectRoot | string | Absolute path to the project root directory. |
$out | PHPForge\ | Output sink used for stdout writes. |
Returns
int: 0 on success.
Throws
RuntimeException: when the lock file cannot be read.