Lines Matching refs:data
105 * @param mixed $data the data depends on the direction, and type of visitor
110 public function accept($data, ?array $type = null) argument
115 $typeName = \gettype($data);
117 $typeName = \get_class($data);
121 } elseif (null === $data) {
128 …f ($this->visitor instanceof NullAwareVisitorInterface && true === $this->visitor->isNull($data)) {
137 return $this->visitor->visitNull($data, $type);
140 return $this->visitor->visitString((string) $data, $type);
144 return $this->visitor->visitInteger((int) $data, $type);
148 return $this->visitor->visitBoolean((bool) $data, $type);
152 return $this->visitor->visitDouble((float) $data, $type);
155 return $this->visitor->visitArray((array) $data, $type);
166 if (null !== $data) {
167 if ($this->context->isVisiting($data)) {
170 $this->context->startVisiting($data);
176 if (is_subclass_of($data, $type['name'], false)) {
177 $type = ['name' => \get_class($data), 'params' => []];
184 …lize', $type['name'], $this->format, $event = new PreSerializeEvent($this->context, $data, $type));
192 $rs = \call_user_func($handler, $this->visitor, $data, $type, $this->context);
193 $this->context->stopVisiting($data);
206 $this->context->stopVisiting($data);
214 $method->invoke($data);
217 $this->visitor->startVisitingObject($metadata, $data, $type);
227 $v = $this->accessor->getValue($data, $propertyMetadata, $this->context);
238 $this->afterVisitingObject($metadata, $data, $type);
240 return $this->visitor->endVisitingObject($metadata, $data, $type);