Returns the URLs keyed by the variant keys requested.

@param TargetInterface $target
@param string[]        $variants     keys for variants to include
@return string[]
187260
public function variantUrlsForTarget(TargetInterface $target, array $variants = [])
    {
        $urls = [
            static::ORIGINAL => $this->storage->url($target->original()),
        ];

        if (in_array(static::ORIGINAL, $variants)) {
            $variants = array_diff($variants, [ static::ORIGINAL ]);
        }

        foreach ($variants as $variant) {
            $urls[ $variant ] = $this->storage->url($target->variant($variant));
        }

        return $urls;
    }
1159175
public function getAnyPartFlag($target = null) {
		$anyPart = false;
		if (empty($target)) {
			$anyPart = $this->_modelConfigSearchInfo->getFlagDefaultSearchAnyPart();
		} elseif (is_array($target) && in_array(CAKE_SEARCH_INFO_TARGET_FIELD_ANY_PART, $target)) {
			$anyPart = true;
		}

		return $anyPart;
	}
530206
protected function performGetRequest($target, $parameters)
	{
		$response = $this->doGetRequest($target, $parameters);
		$result = $this->parseResponse($response);
		return $result;
	}
421749
protected function getRedirectUrl($target, ServerRequestInterface $request)
    {
        $param = $this->getConfig('queryParam');
        if ($param === null) {
            return $target;
        }

        $uri = $request->getUri();
        if (property_exists($uri, 'base')) {
            $uri = $uri->withPath($uri->base . $uri->getPath());
        }
        $query = urlencode($param) . '=' . urlencode($uri);

        $url = parse_url($target);
        if (isset($url['query']) && strlen($url['query'])) {
            $url['query'] .= '&' . $query;
        } else {
            $url['query'] = $query;
        }
        $fragment = isset($url['fragment']) ? '#' . $url['fragment'] : '';

        return $url['path'] . '?' . $url['query'] . $fragment;
    }
475578
private function findInArray(array $target, string $key, int $defaultIndex = 0, $defaultValue = null)
    {
        if (empty($target)) {
            return $defaultValue;
        }
        if (!empty($target[$key])) {
            return $target[$key];
        } elseif (!empty($target[$defaultIndex])) {
            return $target[$defaultIndex];
        }
        return $defaultValue;
    }
456220
private static List<String> getVariantKeys(String variantKeyPrefix, Collection<String> variants) {

		List<String> variantKeys = new ArrayList<>();
		for (String variant : variants) {
			if (variant == null) {
				variant = "";
			}
			if (variantKeyPrefix == null) {
				variantKeys.add(variant);
			} else {
				variantKeys.add(variantKeyPrefix + variant);
			}
		}

		return variantKeys;
	}
315146
protected static function get($target, $key, $default = null)
    {
        if (is_null($key)) {
            return $target;
        }

        $key = is_array($key) ? $key : explode('.', $key);

        while (($segment = array_shift($key)) !== null) {
            if ($segment === '*') {
                if (! is_array($target)) {
                    return $default instanceof Closure ? $default() : $default;
                }

                $result = static::pluck($target, $key);

                return in_array('*', $key) ? static::collapse($result) : $result;
            }

            if (is_array($target) && array_key_exists($segment, $target)) {
                $target = $target[$segment];
            } elseif (is_object($target) && isset($target->{$segment})) {
                $target = $target->{$segment};
            } else {
                return $default instanceof Closure ? $default() : $default;
            }
        }

        return $target;
    }
56922
public function processVariant(StorableFileInterface $source, TargetInterface $target, $variant, array $options = [])
    {
        $storableVariant = $this->processor->process($source, $variant, $options);

        return $this->storage->store($storableVariant, $target->variant($variant));
    }
1330854
public function preserialise ($target, array $args = array()) {

        # Include default args, but allow passed ones to override them
        $args = array_merge($this -> default_args, $args);

        # Serialise an array containing the target
        $result = self::serialiseIterable(array($target), $args, $this -> max_depth, 0);
        return array_shift($result);
    }
775157
private function getTargetParamsFromTarget( $target ) {
		if( $target instanceof EntityId ) {
			return array( 'id' => $target->getSerialization() );
		} elseif( $target instanceof SiteLink ) {
			return array(
				'site' => $target->getSiteId(),
				'title' => $target->getPageName(),
			);
		} else {
			throw new UnexpectedValueException( '$target needs to be an EntityId or SiteLink' );
		}
	}
729414
@Override
    public List<String> getAvailableTargetIds() {
        String[] availableTargetIds = SiteProperties.getAvailableTargetIds();
        if (ArrayUtils.isNotEmpty(availableTargetIds)) {
            return Arrays.asList(availableTargetIds);
        } else {
            throw new IllegalStateException("No available target IDs specified in the configuration");
        }
    }
340518
public function lookup($target)
    {
        // Check if IP
        if (filter_var($target, FILTER_VALIDATE_IP)) {
            return $this->lookupIP($target);
        }

        // Check if domain
        if ($this->verifyDomainName($target)) {
            return $this->lookupDomain($target);
        }

        // Throw an error if both are false
        throw new WhoisException('The target supplied does not appear to be a valid IP or domain name.');
    }
127623
protected function mapJoinTable(array $target = [], array $source = [])
    {
        $joinTable['name'] = $target['name'];

        if ($this->hasJoinColumns($target)) {
            $joinTable['joinColumns'] = $this->mapJoinColumns(
                $target['joinColumns'],
                $source['joinColumns']
            );
        }

        if ($this->hasInverseJoinColumns($target)) {
            $joinTable['inverseJoinColumns'] = $this->mapJoinColumns(
                $target['inverseJoinColumns'],
                $source['inverseJoinColumns']
            );
        }

        return $joinTable;
    }
1229680
public function variantPath($variant = null)
    {
        $variant = $variant ?: FileHandler::ORIGINAL;

        $target = $this->getOrMakeTargetInstance();

        if ($variant == FileHandler::ORIGINAL) {
            return $target->original();
        }

        return $target->variant($variant);
    }
512244
public static function toTarget(Certificate $target,
        CertificateBundle $trust_anchors, CertificateBundle $intermediate = null): self
    {
        $builder = new CertificationPathBuilder($trust_anchors);
        return $builder->shortestPathToTarget($target, $intermediate);
    }
782639
public function getTargetProperties($targetObject, $sourceObject): array
    {
        // We use the property accessor defined on the config, because the one
        // in this mapping's Options might have been overridden to be the
        // object crate implementation.
        $propertyAccessor = $this->autoMapperConfig->getOptions()->getPropertyAccessor();
        if (!$this->options->isObjectCrate($this->destinationClassName)) {
            $properties = $propertyAccessor->getPropertyNames($targetObject);
            return array_values($properties);
        }

        $sourceProperties = $propertyAccessor->getPropertyNames($sourceObject);
        $sourceProperties = array_values($sourceProperties);
        if (!$this->options->shouldConvertName()) {
            return $sourceProperties;
        }

        $nameConverter = function (string $sourceProperty): string {
            return NameConverter::convert(
                $this->options->getSourceMemberNamingConvention(),
                $this->options->getDestinationMemberNamingConvention(),
                $sourceProperty
            );
        };

        return array_map($nameConverter, $sourceProperties);
    }
348956
public static function get($name = null, $target = '')
    {
        if (!func_num_args()) {
            return static::$_matchers;
        }
        if ($target === true) {
            return isset(static::$_matchers[$name]) ? static::$_matchers[$name] : [];
        }
        if ($target === '') {
            if (isset(static::$_matchers[$name][''])) {
                return static::$_matchers[$name][''];
            }
            throw new Exception("Unexisting default matcher attached to `'{$name}'`.");
        }
        if (isset(static::$_matchers[$name][$target])) {
            return static::$_matchers[$name][$target];
        } elseif (isset(static::$_matchers[$name][''])) {
            return static::$_matchers[$name][''];
        }
        throw new Exception("Unexisting matcher attached to `'{$name}'` for `{$target}`.");
    }