@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.)
hq.recaptime.dev/wiki/Phorge
phorge
phabricator
1<?php
2
3final class PhutilSearchQueryToken extends Phobject {
4
5 private $isQuoted;
6 private $value;
7 private $operator;
8 private $function;
9
10 /**
11 * @return PhutilSearchQueryToken
12 */
13 public static function newFromDictionary(array $dictionary) {
14 $token = new self();
15
16 $token->isQuoted = $dictionary['quoted'];
17 $token->operator = $dictionary['operator'];
18 $token->value = $dictionary['value'];
19 $token->function = idx($dictionary, 'function');
20
21 return $token;
22 }
23
24 public function isQuoted() {
25 return $this->isQuoted;
26 }
27
28 public function getValue() {
29 return $this->value;
30 }
31
32 public function getOperator() {
33 return $this->operator;
34 }
35
36 public function getFunction() {
37 return $this->function;
38 }
39
40}