Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F2358938
DrydockLog.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
DrydockLog.php
View Options
<?php
final
class
DrydockLog
extends
DrydockDAO
implements
PhabricatorPolicyInterface
{
protected
$resourceID
;
protected
$leaseID
;
protected
$epoch
;
protected
$message
;
private
$resource
=
self
::
ATTACHABLE
;
private
$lease
=
self
::
ATTACHABLE
;
public
function
getConfiguration
()
{
return
array
(
self
::
CONFIG_TIMESTAMPS
=>
false
,
)
+
parent
::
getConfiguration
();
}
public
function
attachResource
(
DrydockResource
$resource
=
null
)
{
$this
->
resource
=
$resource
;
return
$this
;
}
public
function
getResource
()
{
return
$this
->
assertAttached
(
$this
->
resource
);
}
public
function
attachLease
(
DrydockLease
$lease
=
null
)
{
$this
->
lease
=
$lease
;
return
$this
;
}
public
function
getLease
()
{
return
$this
->
assertAttached
(
$this
->
lease
);
}
/* -( PhabricatorPolicyInterface )----------------------------------------- */
public
function
getCapabilities
()
{
return
array
(
PhabricatorPolicyCapability
::
CAN_VIEW
,
);
}
public
function
getPolicy
(
$capability
)
{
if
(
$this
->
getResource
())
{
return
$this
->
getResource
()->
getPolicy
(
$capability
);
}
return
$this
->
getLease
()->
getPolicy
(
$capability
);
}
public
function
hasAutomaticCapability
(
$capability
,
PhabricatorUser
$viewer
)
{
if
(
$this
->
getResource
())
{
return
$this
->
getResource
()->
hasAutomaticCapability
(
$capability
,
$viewer
);
}
return
$this
->
getLease
()->
hasAutomaticCapability
(
$capability
,
$viewer
);
}
public
function
describeAutomaticCapability
(
$capability
)
{
return
pht
(
'Logs inherit the policy of their resources.'
);
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Tue, Sep 16, 3:08 PM (1 d, 23 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
437762
Default Alt Text
DrydockLog.php (1 KB)
Attached To
Mode
rP Phorge
Attached
Detach File
Event Timeline
Log In to Comment