3 final class PhabricatorPHID
extends Phobject
{
5 public static function generateNewPHID($type, $subtype = null) {
7 throw new Exception(pht('Can not generate PHID with no type.'));
10 if ($subtype === null) {
12 $type_str = "{$type}";
15 $type_str = "{$type}-{$subtype}";
18 $uniq = Filesystem
::readRandomCharacters($uniq_len);
19 return "PHID-{$type_str}-{$uniq}";