Page MenuHomePhorge

PhabricatorPHID.php
No OneTemporary

Size
558 B
Referenced Files
None
Subscribers
None

PhabricatorPHID.php

<?php
final class PhabricatorPHID {
protected $phid;
protected $phidType;
protected $ownerPHID;
protected $parentPHID;
public static function generateNewPHID($type, $subtype = null) {
if (!$type) {
throw new Exception(pht('Can not generate PHID with no type.'));
}
if ($subtype === null) {
$uniq_len = 20;
$type_str = "{$type}";
} else {
$uniq_len = 15;
$type_str = "{$type}-{$subtype}";
}
$uniq = Filesystem::readRandomCharacters($uniq_len);
return "PHID-{$type_str}-{$uniq}";
}
}

File Metadata

Mime Type
text/x-php
Expires
Sun, May 4, 12:58 PM (2 d)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
65369
Default Alt Text
PhabricatorPHID.php (558 B)

Event Timeline