Extract and compose the DefaultResolver found in an AggregateResolver.

Also sets the internal $resolver property to the first found.
514723
private function extractDefaultResolver(AggregateResolver $aggregate) : void
    {
        if ($this->resolver instanceof DefaultResolver) {
            return;
        }

        $resolver = $aggregate->fetchByType(DefaultResolver::class);
        if ($resolver instanceof AggregateResolver) {
            $queue    = $resolver->getIterator();
            $resolver = $queue->top();
        }

        $this->resolver = $resolver;
    }
980849
public function configureOptions(OptionsResolver $resolver)
    {
        $compoundNormalizer = function () {
            return false;
        };

        $multipleNormalizer = function () {
            return true;
        };

        $resolver->setDefaults([
            'multiple' => true,
        ]);

        $resolver->setNormalizer('compound', $compoundNormalizer);
        $resolver->setNormalizer('multiple', $multipleNormalizer);
    }
697870
function defaultResolveFn(source, args, context, { fieldName }) {
  // ensure source is a value for which property access is acceptable.
  if (typeof source === 'object' || typeof source === 'function') {
    const property = source[fieldName];
    if (typeof property === 'function') {
      return source[fieldName](args, context);
    }
    return property;
  }
  return undefined;
}
1179770
function getResolveHandlers(appName, routes, options) {
    var resolveHandlers = {};
    var me = this;

    _.each(routes, function (route) {

        // if no route name, don't do anything
        if (!route.name) { return; }

        // else generate the UI part based on the name
        var uipart = me.getUIPart(appName, route);

        // if there is no model return without doing anything
        if (!uipart.model) { return; }

        var transOpts = _.extend({
            raw: true,
            defaults: uipart.defaults,
            isClient: true
        }, options);

        // else we want to generate the initial model module
        resolveHandlers[route.name] = _.isFunction(uipart.model) ?
            me.transformers.basic.transform(uipart.model, transOpts) :
            JSON.stringify(uipart.model);
    });

    return resolveHandlers || {};
}
692547
public function resolve(Closure $originalResolver, string $path)
    {
        $isDeferred = $this->isDeferred($path);
        $resolver = $isDeferred
            ? $this->deferred[$path]
            : $originalResolver;

        if ($isDeferred) {
            $this->resolved[] = $path;

            unset($this->deferred[$path]);
        }

        return $resolver();
    }
1178534
private function configureStartControlProperties(OptionsResolver $resolver)
    {
        $resolver->setDefined('autostart')
            ->setAllowedTypes('autostart', 'bool');

        $resolver
            ->setDefined('autorestart')
            ->setAllowedTypes('autorestart', ['bool', 'string'])
            ->setAllowedValues('autorestart', [true, false, 'true', 'false', 'unexpected'])
            ->setNormalizer('autorestart', function (Options $options, $value) {
                return (is_bool($value) or $value === 'unexpected') ? $value : ($value === 'true' ? true : false);
            });

        $resolver->setDefined('startsecs')
            ->setAllowedTypes('startsecs', 'int');

        $resolver->setDefined('startretries')
            ->setAllowedTypes('startretries', 'int');
    }
1126324
public static IResolver defaultResolver() {
        return new IResolver() {
            @Override
            public Record[] resolve(Domain domain) throws IOException {
                String[] addresses = defaultServer();
                if (addresses == null) {
                    throw new IOException("no dns server");
                }
                IResolver resolver = new Resolver(InetAddress.getByName(addresses[0]));
                return resolver.resolve(domain);
            }
        };
    }
385707
private void initEntityResolver() {
        final String entityResolveClazzName = System.getProperty( ExtensibleXmlParser.ENTITY_RESOLVER_PROPERTY_NAME );
        if ( entityResolveClazzName != null && entityResolveClazzName.length() > 0 ) {
            try {

                final Class entityResolverClazz = classLoader.loadClass( entityResolveClazzName );
                this.entityResolver = (EntityResolver) entityResolverClazz.newInstance();
            } catch ( final Exception ignoreIt ) {
            }
        }
    }
130521
public static Report validate(final PropertyResolver resolver, final Description description,
            PropertyScope defaultScope) {
        return validate(resolver, description, defaultScope, null);
    }
883511
public function getResolver(){
		if(!isset($this->resolver)){
			$this->resolver = new MultiTypeResolver($this->container, getcwd());
		}
		return $this->resolver;
	}
810789
private function injectResolverPaths($config, Resolver\DefaultResolver $resolver)
    {
        foreach ($config as $index => $paths) {
            $namespace = is_numeric($index) ? null : $index;
            foreach ((array) $paths as $path) {
                $resolver->addTemplatePath($path, $namespace);
            }
        }
    }
835897
def resolvers
      @resolvers ||= from.merge(default: self).map { |origin, hint| { origin: origin, hint: hint, resolver: ((has_group? && group.resolvers[origin]) || Resolver.for(origin)) } }
    end
573364
private function configureStartControlProperties(OptionsResolver $resolver)
    {
        $resolver->setDefined('autostart');
        $this->configureBooleanProperty('autostart', $resolver);


        $resolver
            ->setDefined('autorestart')
            ->setAllowedTypes('autorestart', ['bool', 'string'])
            ->setAllowedValues('autorestart', [true, false, 'true', 'false', 'unexpected'])
            ->setNormalizer('autorestart', function (Options $options, $value) {
                return (is_bool($value) or $value === 'unexpected') ? $value : ($value === 'true' ? true : false);
            });

        $resolver->setDefined('startsecs');
        $this->configureIntegerProperty('startsecs', $resolver);

        $resolver->setDefined('startretries');
        $this->configureIntegerProperty('startretries', $resolver);
    }
858517
static function Loader()
    {
        if (!self::$default_resolver) {
            $resolver = new LoaderAggregate;
            $resolver->attach(new LoaderMapResource, 100);
            self::$default_resolver = $resolver;
        }

        return self::$default_resolver;
    }
460420
public PropertyResolver createPropertyResolver(ResolverWrapper resolverAnnotation) {
		PropertyResolver resolver = null;
		
		// use the impl class to get the property resolver
		Class<? extends PropertyResolver> propertyResolverClass = resolverAnnotation.impl();
		if(propertyResolverClass == null) {
			this.logger.debug("No alternate property resolver provided, using default");
			propertyResolverClass = DefaultPropertyResolver.class;
		} else {
			this.logger.debug("Requesting alternate property resolver: {}", propertyResolverClass.getName());
		}
		resolver = this.beanResolver.resolveBeanWithDefaultClass(propertyResolverClass, DefaultPropertyResolver.class);
		
		return resolver;
	}
1223502
public function configureOptions(OptionsResolver $resolver)
    {
        $resolver->setRequired(
            [
                'family',
            ]
        );
        $resolver->setAllowedTypes('family', ['string', FamilyInterface::class]);
        $resolver->setDefaults(
            [
                'repository' => null,
                'ignore_missing' => true,
            ]
        );
        $resolver->setAllowedTypes('repository', ['NULL', DataRepository::class]);
        $resolver->setAllowedTypes('ignore_missing', ['bool']);

        /** @noinspection PhpUnusedParameterInspection */
        $resolver->setNormalizer(
            'family',
            function (Options $options, $value) {
                if ($value instanceof FamilyInterface) {
                    return $value;
                }

                return $this->familyRegistry->getFamily($value);
            }
        );
        $resolver->setNormalizer(
            'repository',
            function (Options $options, $value) {
                if ($value instanceof DataRepository) {
                    return $value;
                }
                /** @var FamilyInterface $family */
                $family = $options['family'];

                return $this->entityManager->getRepository($family->getDataClass());
            }
        );
    }
1237986
public static PropertyResolver createPrefixedResolver(final PropertyResolver resolver, String providerName, String pluginType) {
        final String projectPrefix = projectPropertyPrefix(pluginPropertyPrefix(pluginType, providerName));
        final String frameworkPrefix = frameworkPropertyPrefix(pluginPropertyPrefix(pluginType, providerName));
        return new PropertyResolver(){
            public Object resolvePropertyValue(String name, PropertyScope scope) {
                String value = null;
                if (scope.isInstanceLevel()) {
                    value = (String)resolver.resolvePropertyValue(name,scope);
                }
                if (null != value || scope == PropertyScope.InstanceOnly) {
                    return value;
                }

                if (scope.isProjectLevel()) {
                    value = (String) resolver.resolvePropertyValue(projectPrefix + name, scope);
                }
                if (null != value || scope == PropertyScope.ProjectOnly) {
                    return value;
                }

                value = (String) resolver.resolvePropertyValue(frameworkPrefix + name, scope);
                return value;
            }
        };

    }