[ Index ]

PHP Cross Reference of Phabricator

title

Body

[close]

/src/applications/diffusion/query/rawdiff/ -> DiffusionRawDiffQuery.php (source)

   1  <?php
   2  
   3  abstract class DiffusionRawDiffQuery extends DiffusionQuery {
   4  
   5    private $timeout;
   6    private $linesOfContext = 65535;
   7    private $anchorCommit;
   8    private $againstCommit;
   9    private $byteLimit;
  10  
  11    final public static function newFromDiffusionRequest(
  12      DiffusionRequest $request) {
  13      return parent::newQueryObject(__CLASS__, $request);
  14    }
  15  
  16    final public function loadRawDiff() {
  17      return $this->executeQuery();
  18    }
  19  
  20    final public function setTimeout($timeout) {
  21      $this->timeout = $timeout;
  22      return $this;
  23    }
  24  
  25    final public function getTimeout() {
  26      return $this->timeout;
  27    }
  28  
  29    public function setByteLimit($byte_limit) {
  30      $this->byteLimit = $byte_limit;
  31      return $this;
  32    }
  33  
  34    public function getByteLimit() {
  35      return $this->byteLimit;
  36    }
  37  
  38    final public function setLinesOfContext($lines_of_context) {
  39      $this->linesOfContext = $lines_of_context;
  40      return $this;
  41    }
  42  
  43    final public function getLinesOfContext() {
  44      return $this->linesOfContext;
  45    }
  46  
  47    final public function setAgainstCommit($value) {
  48      $this->againstCommit = $value;
  49      return $this;
  50    }
  51  
  52    final public function getAgainstCommit() {
  53      return $this->againstCommit;
  54    }
  55  
  56    public function setAnchorCommit($anchor_commit) {
  57      $this->anchorCommit = $anchor_commit;
  58      return $this;
  59    }
  60  
  61    public function getAnchorCommit() {
  62      if ($this->anchorCommit) {
  63        return $this->anchorCommit;
  64      }
  65  
  66      return $this->getRequest()->getStableCommit();
  67    }
  68  
  69    protected function configureFuture(ExecFuture $future) {
  70      if ($this->getTimeout()) {
  71        $future->setTimeout($this->getTimeout());
  72      }
  73  
  74      if ($this->getByteLimit()) {
  75        $future->setStdoutSizeLimit($this->getByteLimit());
  76        $future->setStderrSizeLimit($this->getByteLimit());
  77      }
  78    }
  79  
  80  }


Generated: Sun Nov 30 09:20:46 2014 Cross-referenced by PHPXref 0.7.1