StubLocator
Where a stub is read from: the app's `stubs/` first, the package's own second. The generators ship their templates under this package; an app that wants `make` to write its own conventions (a header, a base class, a docblock style) copies a stub to `<root>/stubs/<name>` and edits it — `stubs:publish` does the copying — and from then on that file wins for that ONE stub while every other keeps coming from the package (greenhouse decisions/0216, point 6). A name that exists in neither place is refused by name, not read as an empty template.
StubLocator::__construct()
public function __construct(string $package = '/home/runner/work/devtools/devtools/src/Make/stubs', ?string $app = null):Parameters
| Name | Type | Description |
|---|---|---|
| $package | string | |
| $app | ?string |
StubLocator::at()
public function at(string $root): selfThe locator bound to an app root: `<root>/stubs/` is consulted before the package.
Parameters
| Name | Type | Description |
|---|---|---|
| $root | string |
StubLocator::path()
public function path(string $name): stringThe file to render for `$name` — the app's copy when it has one, the package's otherwise.
Parameters
| Name | Type | Description |
|---|---|---|
| $name | string |
StubLocator::names()
public function names(): arrayEvery stub the package ships, by name, sorted.
StubLocator::package()
public function package(): stringThe package's stub directory.