Lines Matching refs:this

180         $this->typeParser = new Parser();
181 $this->handlerRegistry = $handlerRegistry ?: new HandlerRegistry();
182 $this->eventDispatcher = $eventDispatcher ?: new EventDispatcher();
183 $this->serializationVisitors = [];
184 $this->deserializationVisitors = [];
187 $this->handlersConfigured = true;
190 $this->listenersConfigured = true;
196 $this->accessorStrategy = $accessorStrategy;
197 return $this;
202 if (!$this->accessorStrategy) {
203 $this->accessorStrategy = new DefaultAccessorStrategy($this->expressionEvaluator);
205 return $this->accessorStrategy;
210 $this->expressionEvaluator = $expressionEvaluator;
212 return $this;
217 $this->typeParser = $parser;
219 return $this;
224 $this->annotationReader = $reader;
226 return $this;
231 $this->debug = $bool;
233 return $this;
239 $this->createDir($dir);
245 $this->cacheDir = $dir;
247 return $this;
252 $this->handlersConfigured = true;
253 $this->handlerRegistry->registerSubscribingHandler(new DateHandler());
254 $this->handlerRegistry->registerSubscribingHandler(new StdClassHandler());
255 $this->handlerRegistry->registerSubscribingHandler(new ArrayCollectionHandler());
256 $this->handlerRegistry->registerSubscribingHandler(new IteratorHandler());
258 return $this;
263 $this->handlersConfigured = true;
264 $closure($this->handlerRegistry);
266 return $this;
271 $this->listenersConfigured = true;
272 $this->eventDispatcher->addSubscriber(new DoctrineProxySubscriber());
274 return $this;
279 $this->listenersConfigured = true;
280 $closure($this->eventDispatcher);
282 return $this;
287 $this->objectConstructor = $constructor;
289 return $this;
294 $this->propertyNamingStrategy = $propertyNamingStrategy;
296 return $this;
301 $this->visitorsAdded = true;
302 $this->serializationVisitors[$format] = $visitor;
304 return $this;
309 $this->visitorsAdded = true;
310 $this->deserializationVisitors[$format] = $visitor;
312 return $this;
317 $this->visitorsAdded = true;
318 $this->serializationVisitors = [
323 return $this;
328 $this->visitorsAdded = true;
329 $this->deserializationVisitors = [
334 return $this;
344 $this->includeInterfaceMetadata = $include;
346 return $this;
368 $this->metadataDirs = $namespacePrefixToDirMap;
370 return $this;
405 if (isset($this->metadataDirs[$namespacePrefix])) {
409 $this->metadataDirs[$namespacePrefix] = $dir;
411 return $this;
424 $this->addMetadataDir($dir, $prefix);
427 return $this;
444 if (!isset($this->metadataDirs[$namespacePrefix])) {
448 $this->metadataDirs[$namespacePrefix] = $dir;
450 return $this;
455 $this->driverFactory = $driverFactory;
457 return $this;
466 $this->serializationContextFactory = $serializationContextFactory;
468 $this->serializationContextFactory = new CallableSerializationContextFactory(
475 return $this;
484 $this->deserializationContextFactory = $deserializationContextFactory;
486 $this->deserializationContextFactory = new CallableDeserializationContextFactory(
493 return $this;
498 $this->metadataCache = $cache;
499 return $this;
504 $annotationReader = $this->annotationReader;
508 if (null !== $this->cacheDir) {
509 $this->createDir($this->cacheDir . '/annotations');
510 $annotationsCache = new FilesystemCache($this->cacheDir . '/annotations');
511 … $annotationReader = new CachedReader($annotationReader, $annotationsCache, $this->debug);
515 if (null === $this->driverFactory) {
516 $this->initializePropertyNamingStrategy();
517 $this->driverFactory = new DefaultDriverFactory(
518 $this->propertyNamingStrategy,
519 $this->typeParser,
520 …$this->expressionEvaluator instanceof CompilableExpressionEvaluatorInterface ? $this->expressionEv…
524 … $metadataDriver = $this->driverFactory->createDriver($this->metadataDirs, $annotationReader);
525 $metadataFactory = new MetadataFactory($metadataDriver, null, $this->debug);
527 $metadataFactory->setIncludeInterfaces($this->includeInterfaceMetadata);
529 if (null !== $this->metadataCache) {
530 $metadataFactory->setCache($this->metadataCache);
531 } elseif (null !== $this->cacheDir) {
532 $this->createDir($this->cacheDir . '/metadata');
533 $metadataFactory->setCache(new FileCache($this->cacheDir . '/metadata'));
536 if (!$this->handlersConfigured) {
537 $this->addDefaultHandlers();
540 if (!$this->listenersConfigured) {
541 $this->addDefaultListeners();
544 if (!$this->visitorsAdded) {
545 $this->addDefaultSerializationVisitors();
546 $this->addDefaultDeserializationVisitors();
549 …GraphNavigatorInterface::DIRECTION_SERIALIZATION => $this->getSerializationNavigatorFactory($metad…
550 …GraphNavigatorInterface::DIRECTION_DESERIALIZATION => $this->getDeserializationNavigatorFactory($m…
556 $this->serializationVisitors,
557 $this->deserializationVisitors,
558 $this->serializationContextFactory,
559 $this->deserializationContextFactory,
560 $this->typeParser
568 $this->handlerRegistry,
569 $this->getAccessorStrategy(),
570 $this->eventDispatcher,
571 $this->expressionEvaluator
579 $this->handlerRegistry,
580 $this->objectConstructor ?: new UnserializeObjectConstructor(),
581 $this->getAccessorStrategy(),
582 $this->eventDispatcher,
583 $this->expressionEvaluator
589 if (null !== $this->propertyNamingStrategy) {
593 …$this->propertyNamingStrategy = new SerializedNameAnnotationStrategy(new CamelCaseNamingStrategy()…