Path: blob/master/src/infrastructure/diff/inline/PhabricatorInlineCommentContentState.php
12242 views
<?php12abstract class PhabricatorInlineCommentContentState3extends Phobject {45private $contentText = '';67public function setContentText($content_text) {8$this->contentText = $content_text;9return $this;10}1112public function getContentText() {13return $this->contentText;14}1516public function isEmptyContentState() {17return !strlen($this->getContentText());18}1920public function writeStorageMap() {21return array(22'text' => $this->getContentText(),23);24}2526public function readStorageMap(array $map) {27$text = (string)idx($map, 'text');28$this->setContentText($text);2930return $this;31}3233final public function readFromRequest(AphrontRequest $request) {34$map = $this->newStorageMapFromRequest($request);35return $this->readStorageMap($map);36}3738protected function newStorageMapFromRequest(AphrontRequest $request) {39$map = array();4041$map['text'] = (string)$request->getStr('text');4243return $map;44}4546}474849