{@inheritdoc}
@see FileInterface::getExtension()
963312
public function getExtension(bool $withDot = false): string
    {
        if (null === $this->extension) {
            $this->setPathInfo();
        }

        return ($withDot ? '.' : '') . $this->extension;
    }
281334
public function getExtension(
        /*# string */ $extensionName
    )/*# : ExtensionAbstract */ {
        if (!$this->hasExtension($extensionName)) {
            $this->addExtension(new $extensionName);
        }
        return $this->extensions[$extensionName];
    }
7597
public function getExtension($reload = false)
	{
		if ($reload || null === $this->extension)
		{
			$this->extension = $this->loadExtension();
		}

		return clone $this->extension;
	}
363167
public static function getExtensionByType($type)
    {
        return empty($foundExtensions = array_keys(self::$_contentTypes, $type)) ? null : $foundExtensions[0];
    }
1231834
public function getFormat()
    {
        try {
            $fileObj = new SplFileObject($this->getName(true) , 'r');
        } catch ( RuntimeException $ex ) {
            throw new FileExistException('The provided file is not readable' , $ex);
        }

        return $fileObj->getExtension();
    }
723159
protected function getExtension($file)
    {
        if (strpos($file, '.') !== false) {
            $tempExt = strtolower(substr($file, strrpos($file, '.') + 1, strlen($file) - strrpos($file, '.')));
            return strtolower(trim($tempExt,'/'));
        }
        return '';
    }
808269
protected function getExtension(UploadedFileInterface $upload)
    {
        $filename = $filename = $upload->getClientFilename();

        return strtolower(pathinfo($filename, PATHINFO_EXTENSION));
    }
442008
function getExtension(file) {
        var ret;
        if (file) {
            var fileTypes = file.split('.');
            var len = fileTypes.length;
            if (0 === len) {
                return ret;
            }
            ret = fileTypes[len - 1];
            return ret;
        }
    }
758996
public static function getExtension($filename)
    {
        Deprecated::method(3.0, 'Use pathinfo() instead.');

        $pos = strrpos($filename, '.');
        if ($pos === false) {
            return '';
        }
        $ext = substr($filename, $pos + 1);

        return $ext;
    }
1097169
public static function getMimeByExtension(string $extension): string
    {
        $extension = strtolower($extension);

        if (!isset(static::$types[$extension])) {
            throw new HttpException("Unknown file extension={$extension}");
        }

        return static::$types[$extension];
    }
1163332
public function extension($sExtension = null)
    {
        if (null === $sExtension) {
            return $this->getExtension();
        }

        return $this->setExtension($sExtension);
    }
1374348
public static function addExtension(string $file, string $extension)
    {
        if (substr($file, strlen($extension) * -1) !== $extension) {
            $file .= $extension;
        }
        return $file;
    }
574267
private function getExtension(string $file): ?string
    {
        $explodedFile = \explode('.', $file);
        $format       = $explodedFile[\count($explodedFile) - 1];
        $cleanFormat  = \explode('?', $format);

        return $cleanFormat[0];
    }
740791
protected function getExtension($path)
    {
        $extensions = array_keys($this->extensions);

        return array_first($extensions, function($key, $value) use ($path)
        {
            return ends_with($path, $value);
        });
    }
835275
public function getExtension()
  {
    $f = $this->getValue();

    if ($f) {
      return $f instanceof UploadedFile ? $f->getClientOriginalExtension() : $f->getExtension();
    }

    return false;
  }
1096007
private function getFileExtensionFromFilepath($filepath)
    {
        $fileExtension = pathinfo($filepath, PATHINFO_EXTENSION);

        if (empty($fileExtension)) {
            throw new \Exception('File extension not found');
        }

        return $fileExtension;
    }
367736
protected function resolveExtends()
    {
        $extend = [];
        foreach ($this->_targets as $name => $target) {
            if (empty($target['extend'])) {
                continue;
            }
            $parent = $target['extend'];
            if (empty($this->_targets[$parent])) {
                throw new RuntimeException("Invalid extend in '$name'. There is no '$parent' target defined.");
            }
            $extend[] = $name;
        }

        $expander = function ($target) use (&$expander, $extend) {
            $config = $this->_targets[$target];
            $parentConfig = false;

            // Recurse through parents to collect all config.
            if (in_array($target, $extend)) {
                $parentConfig = $expander($config['extend']);
            }
            if (!$parentConfig) {
                return $config;
            }
            $config['files'] = array_merge($parentConfig['files'], $config['files']);
            $config['filters'] = array_merge($parentConfig['filters'], $config['filters']);
            $config['theme'] = $parentConfig['theme'] || $config['theme'];
            return $config;
        };

        foreach ($extend as $target) {
            $this->_targets[$target] = $expander($target);
        }
    }