mirror of
https://we.phorge.it/source/phorge.git
synced 2025-02-23 12:09:12 +01:00
Summary: Ref T6822. Test Plan: `grep`. This method is only called from within `PhutilArgumentWorkflow::__construct`. Reviewers: epriestley, #blessed_reviewers Reviewed By: epriestley, #blessed_reviewers Subscribers: Korvin, epriestley Maniphest Tasks: T6822 Differential Revision: https://secure.phabricator.com/D11415
30 lines
666 B
PHP
30 lines
666 B
PHP
<?php
|
|
|
|
final class PhabricatorFilesManagementEnginesWorkflow
|
|
extends PhabricatorFilesManagementWorkflow {
|
|
|
|
protected function didConstruct() {
|
|
$this
|
|
->setName('engines')
|
|
->setSynopsis('List available storage engines.')
|
|
->setArguments(array());
|
|
}
|
|
|
|
public function execute(PhutilArgumentParser $args) {
|
|
$console = PhutilConsole::getConsole();
|
|
|
|
$engines = PhabricatorFile::buildAllEngines();
|
|
if (!$engines) {
|
|
throw new Exception('No storage engines are available.');
|
|
}
|
|
|
|
foreach ($engines as $engine) {
|
|
$console->writeOut(
|
|
"%s\n",
|
|
$engine->getEngineIdentifier());
|
|
}
|
|
|
|
return 0;
|
|
}
|
|
|
|
}
|