/**
  * @param resource $out
  * @param EntityRevisionLookup $lookup Must not resolve redirects
  * @param RdfBuilder $rdfBuilder
  * @param EntityPrefetcher $entityPrefetcher
  *
  * @throws InvalidArgumentException
  */
 public function __construct($out, EntityRevisionLookup $lookup, RdfBuilder $rdfBuilder, EntityPrefetcher $entityPrefetcher)
 {
     parent::__construct($out, $entityPrefetcher);
     if ($lookup instanceof RedirectResolvingEntityLookup) {
         throw new InvalidArgumentException('$lookup must not resolve redirects!');
     }
     $this->rdfBuilder = $rdfBuilder;
     $this->entityRevisionLookup = $lookup;
 }
 /**
  * @param resource $out
  * @param EntityLookup $lookup Must not resolve redirects
  * @param Serializer $entitySerializer
  * @param EntityPrefetcher $entityPrefetcher
  * @param PropertyDataTypeLookup $dataTypeLookup
  *
  * @throws InvalidArgumentException
  */
 public function __construct($out, EntityLookup $lookup, Serializer $entitySerializer, EntityPrefetcher $entityPrefetcher, PropertyDataTypeLookup $dataTypeLookup)
 {
     parent::__construct($out, $entityPrefetcher);
     if ($lookup instanceof RedirectResolvingEntityLookup) {
         throw new InvalidArgumentException('$lookup must not resolve redirects!');
     }
     $this->entitySerializer = $entitySerializer;
     $this->entityLookup = $lookup;
     $this->dataTypeLookup = $dataTypeLookup;
     $this->callbackFactory = new CallbackFactory();
     $this->modifier = new SerializationModifier();
 }