Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F950034
PhabricatorEdgeConfig.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
937 B
Referenced Files
None
Subscribers
None
PhabricatorEdgeConfig.php
View Options
<?php
final
class
PhabricatorEdgeConfig
extends
PhabricatorEdgeConstants
{
const
TABLE_NAME_EDGE
=
'edge'
;
const
TABLE_NAME_EDGEDATA
=
'edgedata'
;
public
static
function
establishConnection
(
$phid_type
,
$conn_type
)
{
$map
=
PhabricatorPHIDType
::
getAllTypes
();
if
(
isset
(
$map
[
$phid_type
]))
{
$type
=
$map
[
$phid_type
];
$object
=
$type
->
newObject
();
if
(
$object
)
{
return
$object
->
establishConnection
(
$conn_type
);
}
}
static
$class_map
=
array
(
PhabricatorPHIDConstants
::
PHID_TYPE_TOBJ
=>
'HarbormasterObject'
,
PhabricatorPHIDConstants
::
PHID_TYPE_XOBJ
=>
'DoorkeeperExternalObject'
,
);
$class
=
idx
(
$class_map
,
$phid_type
);
if
(!
$class
)
{
throw
new
Exception
(
pht
(
"Edges are not available for objects of type '%s'!"
,
$phid_type
));
}
return
newv
(
$class
,
array
())->
establishConnection
(
$conn_type
);
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Tue, Jun 17, 1:54 PM (1 d, 23 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
224032
Default Alt Text
PhabricatorEdgeConfig.php (937 B)
Attached To
Mode
rP Phorge
Attached
Detach File
Event Timeline
Log In to Comment