Changeset View
Changeset View
Standalone View
Standalone View
src/applications/diffusion/query/rawdiff/DiffusionRawDiffQuery.php
| <?php | <?php | ||||
| abstract class DiffusionRawDiffQuery extends DiffusionQuery { | abstract class DiffusionRawDiffQuery | ||||
| extends DiffusionFileFutureQuery { | |||||
| private $timeout; | |||||
| private $linesOfContext = 65535; | private $linesOfContext = 65535; | ||||
| private $anchorCommit; | private $anchorCommit; | ||||
| private $againstCommit; | private $againstCommit; | ||||
| private $byteLimit; | |||||
| final public static function newFromDiffusionRequest( | final public static function newFromDiffusionRequest( | ||||
| DiffusionRequest $request) { | DiffusionRequest $request) { | ||||
| return parent::newQueryObject(__CLASS__, $request); | return parent::newQueryObject(__CLASS__, $request); | ||||
| } | } | ||||
| final public function loadRawDiff() { | |||||
| return $this->executeQuery(); | |||||
| } | |||||
| final public function setTimeout($timeout) { | |||||
| $this->timeout = $timeout; | |||||
| return $this; | |||||
| } | |||||
| final public function getTimeout() { | |||||
| return $this->timeout; | |||||
| } | |||||
| public function setByteLimit($byte_limit) { | |||||
| $this->byteLimit = $byte_limit; | |||||
| return $this; | |||||
| } | |||||
| public function getByteLimit() { | |||||
| return $this->byteLimit; | |||||
| } | |||||
| final public function setLinesOfContext($lines_of_context) { | final public function setLinesOfContext($lines_of_context) { | ||||
| $this->linesOfContext = $lines_of_context; | $this->linesOfContext = $lines_of_context; | ||||
| return $this; | return $this; | ||||
| } | } | ||||
| final public function getLinesOfContext() { | final public function getLinesOfContext() { | ||||
| return $this->linesOfContext; | return $this->linesOfContext; | ||||
| } | } | ||||
| Show All 15 Lines | abstract class DiffusionRawDiffQuery | ||||
| public function getAnchorCommit() { | public function getAnchorCommit() { | ||||
| if ($this->anchorCommit) { | if ($this->anchorCommit) { | ||||
| return $this->anchorCommit; | return $this->anchorCommit; | ||||
| } | } | ||||
| return $this->getRequest()->getStableCommit(); | return $this->getRequest()->getStableCommit(); | ||||
| } | } | ||||
| protected function configureFuture(ExecFuture $future) { | |||||
| if ($this->getTimeout()) { | |||||
| $future->setTimeout($this->getTimeout()); | |||||
| } | |||||
| if ($this->getByteLimit()) { | |||||
| $future->setStdoutSizeLimit($this->getByteLimit()); | |||||
| $future->setStderrSizeLimit($this->getByteLimit()); | |||||
| } | |||||
| } | |||||
| } | } | ||||