function GPBUtil::checkInt64
22 calls to GPBUtil::checkInt64()
- AnyValue::setIntValue in vendor/
open-telemetry/ gen-otlp-protobuf/ Opentelemetry/ Proto/ Common/ V1/ AnyValue.php - Generated from protobuf field <code>int64 int_value = 3;</code>
- Duration::setSeconds in vendor/
google/ protobuf/ src/ Google/ Protobuf/ Duration.php - Signed seconds of the span of time. Must be from -315,576,000,000 to +315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
- Exemplar::setAsInt in vendor/
open-telemetry/ gen-otlp-protobuf/ Opentelemetry/ Proto/ Metrics/ V1/ Exemplar.php - Generated from protobuf field <code>sfixed64 as_int = 6;</code>
- ExportLogsPartialSuccess::setRejectedLogRecords in vendor/
open-telemetry/ gen-otlp-protobuf/ Opentelemetry/ Proto/ Collector/ Logs/ V1/ ExportLogsPartialSuccess.php - The number of rejected log records. A `rejected_<signal>` field holding a `0` value indicates that the request was fully accepted.
- ExportMetricsPartialSuccess::setRejectedDataPoints in vendor/
open-telemetry/ gen-otlp-protobuf/ Opentelemetry/ Proto/ Collector/ Metrics/ V1/ ExportMetricsPartialSuccess.php - The number of rejected data points. A `rejected_<signal>` field holding a `0` value indicates that the request was fully accepted.
File
-
vendor/
google/ protobuf/ src/ Google/ Protobuf/ Internal/ GPBUtil.php, line 115
Class
Namespace
Google\Protobuf\InternalCode
public static function checkInt64(&$var) {
if (is_numeric($var)) {
if (PHP_INT_SIZE == 8) {
$var = intval($var);
}
else {
if (is_float($var) || is_integer($var) || is_string($var) && bccomp($var, "9223372036854774784") < 0) {
$var = number_format($var, 0, ".", "");
}
}
}
else {
throw new \Exception("Expect integer.");
}
}