Differential D21276 Diff 50670 src/applications/differential/storage/DifferentialTransactionComment.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/differential/storage/DifferentialTransactionComment.php
Show All 12 Lines | final class DifferentialTransactionComment | ||||
protected $fixedState; | protected $fixedState; | ||||
protected $hasReplies = 0; | protected $hasReplies = 0; | ||||
protected $replyToCommentPHID; | protected $replyToCommentPHID; | ||||
protected $attributes = array(); | protected $attributes = array(); | ||||
private $replyToComment = self::ATTACHABLE; | private $replyToComment = self::ATTACHABLE; | ||||
private $isHidden = self::ATTACHABLE; | private $isHidden = self::ATTACHABLE; | ||||
private $changeset = self::ATTACHABLE; | private $changeset = self::ATTACHABLE; | ||||
private $inlineContext = self::ATTACHABLE; | |||||
public function getApplicationTransactionObject() { | public function getApplicationTransactionObject() { | ||||
return new DifferentialTransaction(); | return new DifferentialTransaction(); | ||||
} | } | ||||
public function attachReplyToComment( | public function attachReplyToComment( | ||||
DifferentialTransactionComment $comment = null) { | DifferentialTransactionComment $comment = null) { | ||||
$this->replyToComment = $comment; | $this->replyToComment = $comment; | ||||
▲ Show 20 Lines • Show All 95 Lines • ▼ Show 20 Lines | public function getAttribute($key, $default = null) { | ||||
return idx($this->attributes, $key, $default); | return idx($this->attributes, $key, $default); | ||||
} | } | ||||
public function setAttribute($key, $value) { | public function setAttribute($key, $value) { | ||||
$this->attributes[$key] = $value; | $this->attributes[$key] = $value; | ||||
return $this; | return $this; | ||||
} | } | ||||
public function isEmptyInlineComment() { | |||||
return !strlen($this->getContent()); | |||||
} | |||||
public function newInlineCommentObject() { | public function newInlineCommentObject() { | ||||
return DifferentialInlineComment::newFromModernComment($this); | return DifferentialInlineComment::newFromModernComment($this); | ||||
} | } | ||||
public function getInlineContext() { | |||||
return $this->assertAttached($this->inlineContext); | |||||
} | |||||
public function attachInlineContext( | |||||
PhabricatorInlineCommentContext $context = null) { | |||||
$this->inlineContext = $context; | |||||
return $this; | |||||
} | |||||
} | } |