Lines Matching refs:value
82 foreach ($array as $name => $value) {
83 if ($value instanceof \DateTimeInterface) {
84 $array[$name] = $this->formatDate($value, $nestingLevel + 1);
85 } elseif ($value instanceof \Throwable) {
86 $array[$name] = $this->formatException($value, $nestingLevel + 1);
87 } elseif (is_array($value)) {
88 $array[$name] = $this->formatArray($value, $nestingLevel + 1);
89 } elseif (is_object($value) && !$value instanceof Type) {
90 $array[$name] = $this->formatObject($value, $nestingLevel + 1);
98 * @param mixed $value
101 protected function formatObject($value, int $nestingLevel) argument
103 $objectVars = get_object_vars($value);
104 $objectVars['class'] = Utils::getClass($value);
130 protected function formatDate(\DateTimeInterface $value, int $nestingLevel): UTCDateTime argument
133 return $this->legacyGetMongoDbDateTime($value);
136 return $this->getMongoDbDateTime($value);
139 private function getMongoDbDateTime(\DateTimeInterface $value): UTCDateTime argument
141 return new UTCDateTime((int) floor(((float) $value->format('U.u')) * 1000));
151 private function legacyGetMongoDbDateTime(\DateTimeInterface $value): UTCDateTime argument
153 $milliseconds = floor(((float) $value->format('U.u')) * 1000);