Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F106084352
PhamePostViewsTransaction.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
Sat, Mar 22, 05:50
Size
357 B
Mime Type
text/x-php
Expires
Mon, Mar 24, 05:50 (1 d, 23 h)
Engine
blob
Format
Raw Data
Handle
25058616
Attached To
rPH Phabricator
PhamePostViewsTransaction.php
View Options
<?php
final
class
PhamePostViewsTransaction
extends
PhamePostTransactionType
{
const
TRANSACTIONTYPE
=
'phame.post.views'
;
public
function
generateOldValue
(
$object
)
{
return
$object
->
getViews
();
}
public
function
applyInternalEffects
(
$object
,
$value
)
{
$views
=
$object
->
getViews
();
$views
++;
$object
->
setViews
(
$views
);
}
}
Event Timeline
Log In to Comment