Gets whether or not a name has an extension

@param string $name The name to check
@param array $sortedExtensions The list of sorted extensions to check against
@return bool True if the name has an extension, otherwise false
9031
protected function nameHasExtension(string $name, array $sortedExtensions) : bool
    {
        foreach ($sortedExtensions as $extension) {
            $lengthDifference = strlen($name) - strlen($extension);

            if ($lengthDifference > 0 && strpos($name, $extension, $lengthDifference) !== false) {
                return true;
            }
        }

        return false;
    }
35222
public function getExtension($name)
    {
        if ($this->parent) {
            return $this->parent->getExtension($name);
        }

        return $this->callables[$name];
    }
145315
public function getExtension($name)
    {
        if ($this->hasExtension($name)) {
            return $this->_extensions[$name];
        }

        throw new OutOfBoundsException(get_class($this).": No extension named \"$name\" found");
    }
1293515
public function isFileExtensionImage($name) {
		static $imageExtensions = array(
			'jpg' => true,
			'png' => true,
			'jpeg' => true,
			'bmp' => true,
			'ico' => true,
			'gif' => true,
			'tiff' => true,
			'jpeg-large' => true,
			'jpg-large' => true,
		);
		$ext = pathinfo($name, PATHINFO_EXTENSION);
		return ($imageExtensions && isset($imageExtensions[$ext]) && $imageExtensions[$ext]);
	}
505334
public function has($name)
    {
        Types::assert(['string' => [$name]]);

        return array_key_exists(strtolower($name), $this->headers);
    }
256663
public function has($name, $checkAbstractFactories = true, $usePeeringServiceManagers = false)
    {
        if (is_string($name) && $this->container->has($name)) {
            return true;
        } elseif (parent::has($name, $checkAbstractFactories, $usePeeringServiceManagers)) {
            return true;
        }

        return false;
    }
244291
public function has(string $name): bool
    {
        return isset($this->stack[$this->normalizeName($name)]);
    }
112447
public function hasSettingsForm(string $name): bool
    {
        $extension = $this->getAvailableExtensions()->findByName($this->getNormalizedName($name));

        if ($extension instanceof ExtensionContract) {
            if ($extension->getSettings()->getCustomUrl()) {
                return true;
            }

            return app()->make(SettingsFormResolver::class)->hasSettingsForm($extension);
        }

        return false;
    }
254726
public function extension_loaded($name)
    {
        $code = new Code();
        $code->addStatement(sprintf(
            "return extension_loaded(%s);",
            var_export($name, true)
        ));

        return $this->adapter->run($code);
    }
984382
protected function loadTypeExtensions($name)
    {
        $typeExtensions = [];

        $extensions = $this->getExtensions();
        foreach ($extensions as $extension) {
            if ($extension->hasTypeExtensions($name)) {
                $typeExtensions = array_merge($typeExtensions, $extension->getTypeExtensions($name));
            }
        }
        $this->typeExtensions[$name] = $typeExtensions;

        return $typeExtensions;
    }
565226
private function isExcluded($name)
    {
        foreach ($this->exclude as $item) {
            if (fnmatch($item, $name)) {
                return true;
            }
        }
        return false;
    }
167097
public function has(string $name): bool
    {
        foreach ($this->elements as $element) {
            if ($element instanceof NamedInterface && $element->getName() == $name) {
                return true;
            }
        }

        return false;
    }
85217
public function hasField($name)
    {
        if ('pk' === $name) {
            $name = $this->getPkName();
        }

        return array_key_exists($name, $this->fields) || array_key_exists($name, $this->mapping);
    }
626243
public function hasExtraConfiguration($name)
    {
        $name = $this->resolveString($name, __METHOD__);

        return isset($this->extraConfiguration[$name]);
    }
1004861
public function extension(string $name): bool
    {
        if (\is_null($path = $this->getPathFromExtensionName($name))) {
            return false;
        }

        try {
            return $this->publish($name, $path);
        } catch (Exception $e) {
            throw new FilePermissionException("Unable to publish [{$path}].");
        }
    }
1012697
public function getExtension($name)
    {
        if ($extension = $this->nearestForClass($name)) {
            return $extension;
        }

        throw new OutOfBoundsException(get_class($this).": No extension named \"$name\" found");
    }
535504
public function supports($name)
    {
        // @codeCoverageIgnoreStart
        $extensions = method_exists($this->jade, 'getExtensions')
            ? $this->jade->getExtensions()
            : $this->jade->getOption('extensions');
        // @codeCoverageIgnoreEnd
        foreach ($extensions as $extension) {
            if (substr($name, -strlen($extension)) === $extension) {
                return true;
            }
        }

        return false;
    }