Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F121327518
PhabricatorRepositoryMirror.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Thu, Jul 10, 02:10
Size
1 KB
Mime Type
text/x-php
Expires
Sat, Jul 12, 02:10 (1 d, 23 h)
Engine
blob
Format
Raw Data
Handle
27310744
Attached To
rPH Phabricator
PhabricatorRepositoryMirror.php
View Options
<?php
final
class
PhabricatorRepositoryMirror
extends
PhabricatorRepositoryDAO
implements
PhabricatorPolicyInterface
{
protected
$repositoryPHID
;
protected
$remoteURI
;
protected
$credentialPHID
;
private
$repository
=
self
::
ATTACHABLE
;
public
static
function
initializeNewMirror
(
PhabricatorUser
$actor
)
{
return
id
(
new
PhabricatorRepositoryMirror
())
->
setRemoteURI
(
''
);
}
protected
function
getConfiguration
()
{
return
array
(
self
::
CONFIG_AUX_PHID
=>
true
,
self
::
CONFIG_COLUMN_SCHEMA
=>
array
(
'remoteURI'
=>
'text255'
,
'credentialPHID'
=>
'phid?'
,
),
self
::
CONFIG_KEY_SCHEMA
=>
array
(
'key_repository'
=>
array
(
'columns'
=>
array
(
'repositoryPHID'
),
),
),
)
+
parent
::
getConfiguration
();
}
public
function
generatePHID
()
{
return
PhabricatorPHID
::
generateNewPHID
(
PhabricatorRepositoryMirrorPHIDType
::
TYPECONST
);
}
public
function
attachRepository
(
PhabricatorRepository
$repository
)
{
$this
->
repository
=
$repository
;
return
$this
;
}
public
function
getRepository
()
{
return
$this
->
assertAttached
(
$this
->
repository
);
}
/* -( PhabricatorPolicyInterface )----------------------------------------- */
public
function
getCapabilities
()
{
return
array
(
PhabricatorPolicyCapability
::
CAN_VIEW
,
PhabricatorPolicyCapability
::
CAN_EDIT
,
);
}
public
function
getPolicy
(
$capability
)
{
return
$this
->
getRepository
()->
getPolicy
(
$capability
);
}
public
function
hasAutomaticCapability
(
$capability
,
PhabricatorUser
$viewer
)
{
return
$this
->
getRepository
()->
hasAutomaticCapability
(
$capability
,
$viewer
);
}
public
function
describeAutomaticCapability
(
$capability
)
{
return
null
;
}
}
Event Timeline
Log In to Comment