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')
|
2015-05-22 09:27:56 +02:00
|
|
|
->setSynopsis(pht('List available storage engines.'))
|
2012-10-25 20:36:38 +02:00
|
|
|
->setArguments(array());
|
|
|
|
}
|
|
|
|
|
|
|
|
public function execute(PhutilArgumentParser $args) {
|
|
|
|
$console = PhutilConsole::getConsole();
|
|
|
|
|
|
|
|
$engines = PhabricatorFile::buildAllEngines();
|
|
|
|
if (!$engines) {
|
2015-05-22 09:27:56 +02:00
|
|
|
throw new Exception(pht('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;
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|