本文整理汇总了PHP中PhabricatorRepositoryCommit::newFromDictionary方法的典型用法代码示例。如果您正苦于以下问题:PHP PhabricatorRepositoryCommit::newFromDictionary方法的具体用法?PHP PhabricatorRepositoryCommit::newFromDictionary怎么用?PHP PhabricatorRepositoryCommit::newFromDictionary使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PhabricatorRepositoryCommit
的用法示例。
在下文中一共展示了PhabricatorRepositoryCommit::newFromDictionary方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: newFromConduit
public static function newFromConduit(array $dicts)
{
$results = array();
foreach ($dicts as $dict) {
$commit = PhabricatorRepositoryCommit::newFromDictionary($dict['commit']);
$commit_data = PhabricatorRepositoryCommitData::newFromDictionary($dict['commitData']);
$results[] = id(new DiffusionPathChange())->setPath($dict['path'])->setCommitIdentifier($dict['commitIdentifier'])->setCommit($commit)->setCommitData($commit_data)->setFileType($dict['fileType'])->setChangeType($dict['changeType'])->setTargetPath($dict['targetPath'])->setTargetCommitIdentifier($dict['targetCommitIdentifier'])->setAwayPaths($dict['awayPaths']);
}
return $results;
}
示例2: newFromDictionary
public static function newFromDictionary(array $dict)
{
$path = id(new DiffusionRepositoryPath())->setFullPath($dict['fullPath'])->setPath($dict['path'])->setHash($dict['hash'])->setFileType($dict['fileType'])->setFileSize($dict['fileSize'])->setExternalURI($dict['externalURI']);
if ($dict['lastModifiedCommit']) {
$last_modified_commit = PhabricatorRepositoryCommit::newFromDictionary($dict['lastModifiedCommit']);
$path->setLastModifiedCommit($last_modified_commit);
}
if ($dict['lastCommitData']) {
$last_commit_data = PhabricatorRepositoryCommitData::newFromDictionary($dict['lastCommitData']);
$path->setLastCommitData($last_commit_data);
}
return $path;
}