public function __construct($args, Query $top) { if (!is_array($args)) { throw new RqlDriverError("Arguments must be an array."); } foreach ($args as &$arg) { if (!is_a($arg, "\\r\\RVar")) { throw new RqlDriverError("Arguments must be RVar variables."); } $arg = new NumberDatum($arg->getId()); unset($arg); } $this->setPositionalArg(0, new ArrayDatum($args)); $this->setPositionalArg(1, $top); }
public static function _fromJSON($json) { $result = new NumberDatum(); $result->setValue((double) $json); return $result; }
public static function _fromProtobuffer(pb\Datum $datum) { $val = $datum->getRNum(); $result = new NumberDatum(); $result->setValue($val); return $result; }