2012-10-25 20:36:38 +02:00
|
|
|
<?php
|
|
|
|
|
|
|
|
final class PhabricatorFilesManagementEnginesWorkflow
|
|
|
|
extends PhabricatorFilesManagementWorkflow {
|
|
|
|
|
2015-01-15 21:42:07 +01:00
|
|
|
protected function didConstruct() {
|
2012-10-25 20:36:38 +02:00
|
|
|
$this
|
|
|
|
->setName('engines')
|
|
|
|
->setSynopsis('List available storage engines.')
|
|
|
|
->setArguments(array());
|
|
|
|
}
|
|
|
|
|
|
|
|
public function execute(PhutilArgumentParser $args) {
|
|
|
|
$console = PhutilConsole::getConsole();
|
|
|
|
|
|
|
|
$engines = PhabricatorFile::buildAllEngines();
|
|
|
|
if (!$engines) {
|
2014-06-09 20:36:49 +02:00
|
|
|
throw new Exception('No storage engines are available.');
|
2012-10-25 20:36:38 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
foreach ($engines as $engine) {
|
|
|
|
$console->writeOut(
|
|
|
|
"%s\n",
|
|
|
|
$engine->getEngineIdentifier());
|
|
|
|
}
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|