Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
freebsd
GitHub Repository: freebsd/phabricator
Path: blob/master/src/applications/files/management/PhabricatorFilesManagementEnginesWorkflow.php
13441 views
1
<?php
2
3
final class PhabricatorFilesManagementEnginesWorkflow
4
extends PhabricatorFilesManagementWorkflow {
5
6
protected function didConstruct() {
7
$this
8
->setName('engines')
9
->setSynopsis(pht('List available storage engines.'))
10
->setArguments(array());
11
}
12
13
public function execute(PhutilArgumentParser $args) {
14
$console = PhutilConsole::getConsole();
15
16
$engines = PhabricatorFile::buildAllEngines();
17
if (!$engines) {
18
throw new Exception(pht('No storage engines are available.'));
19
}
20
21
foreach ($engines as $engine) {
22
$console->writeOut(
23
"%s\n",
24
$engine->getEngineIdentifier());
25
}
26
27
return 0;
28
}
29
30
}
31
32