本文整理匯總了PHP中PhabricatorRepository::loadAllByPHIDOrCallsign方法的典型用法代碼示例。如果您正苦於以下問題:PHP PhabricatorRepository::loadAllByPHIDOrCallsign方法的具體用法?PHP PhabricatorRepository::loadAllByPHIDOrCallsign怎麽用?PHP PhabricatorRepository::loadAllByPHIDOrCallsign使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類PhabricatorRepository
的用法示例。
在下文中一共展示了PhabricatorRepository::loadAllByPHIDOrCallsign方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: execute
public function execute(PhutilArgumentParser $args)
{
$names = $args->getArg('repos');
$repos = PhabricatorRepository::loadAllByPHIDOrCallsign($names);
if (!$repos) {
throw new PhutilArgumentUsageException("Specify one or more repositories to pull, by callsign or PHID.");
}
$console = PhutilConsole::getConsole();
foreach ($repos as $repo) {
$console->writeOut("Pulling '%s'...\n", $repo->getCallsign());
$daemon = new PhabricatorRepositoryPullLocalDaemon(array());
$daemon->setVerbose($args->getArg('verbose'));
$daemon->pullRepository($repo);
}
$console->writeOut("Done.\n");
return 0;
}
示例2: loadRepositories
/**
* @task pull
*/
protected function loadRepositories(array $names)
{
if (!count($names)) {
return id(new PhabricatorRepository())->loadAll();
} else {
return PhabricatorRepository::loadAllByPHIDOrCallsign($names);
}
}