Changeset View
Changeset View
Standalone View
Standalone View
src/configuration/ArcanistConfiguration.php
| <?php | <?php | ||||
| /** | /** | ||||
| * Runtime workflow configuration. In Arcanist, commands you type like | * Runtime workflow configuration. In Arcanist, commands you type like | ||||
| * "arc diff" or "arc lint" are called "workflows". This class allows you to add | * "arc diff" or "arc lint" are called "workflows". This class allows you to add | ||||
| * new workflows (and extend existing workflows) by subclassing it and then | * new workflows (and extend existing workflows) by subclassing it and then | ||||
| * pointing to your subclass in your project configuration. | * pointing to your subclass in your project configuration. | ||||
| * | * | ||||
| * When specified as the **arcanist_configuration** class in your project's | * When specified as the **arcanist_configuration** class in your project's | ||||
| * ##.arcconfig##, your subclass will be instantiated (instead of this class) | * `.arcconfig`, your subclass will be instantiated (instead of this class) | ||||
| * and be able to handle all the method calls. In particular, you can: | * and be able to handle all the method calls. In particular, you can: | ||||
| * | * | ||||
| * - create, replace, or disable workflows by overriding buildWorkflow() | * - create, replace, or disable workflows by overriding `buildWorkflow()` | ||||
| * and buildAllWorkflows(); | * and `buildAllWorkflows()`; | ||||
| * - add additional steps before or after workflows run by overriding | * - add additional steps before or after workflows run by overriding | ||||
| * willRunWorkflow() or didRunWorkflow() or didAbortWorkflow(); and | * `willRunWorkflow()` or `didRunWorkflow()` or `didAbortWorkflow()`; and | ||||
| * - add new flags to existing workflows by overriding | * - add new flags to existing workflows by overriding | ||||
| * getCustomArgumentsForCommand(). | * `getCustomArgumentsForCommand()`. | ||||
| * | * | ||||
| * @concrete-extensible | * @concrete-extensible | ||||
| */ | */ | ||||
| class ArcanistConfiguration extends Phobject { | class ArcanistConfiguration extends Phobject { | ||||
| public function buildWorkflow($command) { | public function buildWorkflow($command) { | ||||
| if ($command == '--help') { | if ($command == '--help') { | ||||
| // Special-case "arc --help" to behave like "arc help" instead of telling | // Special-case "arc --help" to behave like "arc help" instead of telling | ||||
| ▲ Show 20 Lines • Show All 161 Lines • Show Last 20 Lines | |||||