Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F93448532
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
Thu, Nov 28, 20:30
Size
357 B
Mime Type
text/x-php
Expires
Sat, Nov 30, 20:30 (1 d, 23 h)
Engine
blob
Format
Raw Data
Handle
22640685
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