Remove product literal strings in "pht()", part 18
[phabricator.git] / src / infrastructure / query / policy / PhabricatorQueryCursor.php
blob4ec1263130eb03a3461631f36a5158f65eda7909
1 <?php
3 final class PhabricatorQueryCursor
4 extends Phobject {
6 private $object;
7 private $rawRow;
9 public function setObject($object) {
10 $this->object = $object;
11 return $this;
14 public function getObject() {
15 return $this->object;
18 public function setRawRow(array $raw_row) {
19 $this->rawRow = $raw_row;
20 return $this;
23 public function getRawRow() {
24 return $this->rawRow;
27 public function getRawRowProperty($key) {
28 if (!is_array($this->rawRow)) {
29 throw new Exception(
30 pht(
31 'Caller is trying to "getRawRowProperty()" with key "%s", but this '.
32 'cursor has no raw row.',
33 $key));
36 if (!array_key_exists($key, $this->rawRow)) {
37 throw new Exception(
38 pht(
39 'Caller is trying to access raw row property "%s", but the row '.
40 'does not have this property.',
41 $key));
44 return $this->rawRow[$key];