Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F546440
PhabricatorDestructibleCodex.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
PhabricatorDestructibleCodex.php
View Options
<?php
abstract
class
PhabricatorDestructibleCodex
extends
Phobject
{
private
$viewer
;
private
$object
;
public
function
getDestructionNotes
()
{
return
array
();
}
final
public
function
setViewer
(
PhabricatorUser
$viewer
)
{
$this
->
viewer
=
$viewer
;
return
$this
;
}
final
public
function
getViewer
()
{
return
$this
->
viewer
;
}
final
public
function
setObject
(
PhabricatorDestructibleCodexInterface
$object
)
{
$this
->
object
=
$object
;
return
$this
;
}
final
public
function
getObject
()
{
return
$this
->
object
;
}
final
public
static
function
newFromObject
(
PhabricatorDestructibleCodexInterface
$object
,
PhabricatorUser
$viewer
)
{
if
(!(
$object
instanceof
PhabricatorDestructibleInterface
))
{
throw
new
Exception
(
pht
(
'Object (of class "%s") implements interface "%s", but must also '
.
'implement interface "%s".'
,
get_class
(
$object
),
'PhabricatorDestructibleCodexInterface'
,
'PhabricatorDestructibleInterface'
));
}
$codex
=
$object
->
newDestructibleCodex
();
if
(!(
$codex
instanceof
PhabricatorDestructibleCodex
))
{
throw
new
Exception
(
pht
(
'Object (of class "%s") implements interface "%s", but defines '
.
'method "%s" incorrectly: this method must return an object of '
.
'class "%s".'
,
get_class
(
$object
),
'PhabricatorDestructibleCodexInterface'
,
'newDestructibleCodex()'
,
__CLASS__
));
}
$codex
->
setObject
(
$object
)
->
setViewer
(
$viewer
);
return
$codex
;
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Mon, May 12, 1:15 PM (2 d)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
122544
Default Alt Text
PhabricatorDestructibleCodex.php (1 KB)
Attached To
Mode
rP Phorge
Attached
Detach File
Event Timeline
Log In to Comment