Get possible extensions for this type
@return array Array of possible extensions for this Mime type
503229
public function getExtensions()
		{

			// Loop through extension map
			$exts = array();
			foreach (self::$extensionMap as $ext => $type) {
				if ($type == $this->type) {
					$exts[] = $ext;
				}
			}
			return $exts;

		}
844392
public static function getExtensions(array $mimetypes)
    {
        $extensions = [];
        foreach ($mimetypes as $mimetype) {
            $extension = static::getExtensionByMime($mimetype, false);
            if ($extension && !\in_array($extension, $extensions, true)) {
                $extensions[] = $extension;
            }
        }

        return $extensions;
    }
231720
public function getMimeType()
    {
        // return mime type ala mimetype extension
        $finfo = finfo_open(FILEINFO_MIME);

        $mime = finfo_file($finfo, $this->getFullPath());

        return $mime;
    }
664713
public function getInstalledExtensions()
    {
        $returnValue = array();
        foreach ($this->getInstalledExtensionsIds() as $extId) {
            $returnValue[$extId] = $this->getExtensionById($extId);
        }
        return $returnValue;
    }
89207
public function getExtension()
    {
        if (is_null($this->extension) === true) {
            $filename = parent::getFilename();
            $str = new StringWrapper($filename);
            $this->extension = $str->getFirstEndMatch($this->predefinedExtensions);
            $this->hasPredefinedExt = true;

            if ($this->extension === '') {
                $this->hasPredefinedExt = false;
                $this->extension = parent::getExtension();
            }
        }

        return $this->extension;
    }
918543
protected function getExtensions() {
        if (!$this->_extensions) {
            $this->_extensions = new AvailableAddOnExtensionList($this->version, $this->solution['sid']);
        }

        return $this->_extensions;
    }
187831
public function getExtension()
    {
        if (!isset($this->file['name'])) {
            return null;
        }

        $extension = pathinfo(
            $this->file['name'],
            PATHINFO_EXTENSION
        );

        return strtolower($extension);
    }
740544
public function generateMapping()
	{
		$mapping = array();
		$lines = explode("\n", $this->mime_types_text);
		foreach ($lines as $line) {
			$line = trim(preg_replace('~\\#.*~', '', $line));
			$parts = $line ? array_values(array_filter(explode("\t", $line))) : array();
			if (count($parts) === 2) {
				$mime = trim($parts[0]);
				$extensions = explode(' ', $parts[1]);
				foreach ($extensions as $extension) {
					$extension = trim($extension);
					if ($mime && $extension) {
						$mapping['mimes'][$extension][] = $mime;
						$mapping['extensions'][$mime][] = $extension;
						$mapping['mimes'][$extension] = array_unique($mapping['mimes'][$extension]);
						$mapping['extensions'][$mime] = array_unique($mapping['extensions'][$mime]);
					}
				}
			}
		}
		return $mapping;
	}
960280
protected function getMimesByExtensions(array $extensions)
    {
        $output = [];
        foreach ($extensions as $ext) {
            if (($mime = $this->getMimeByExtension($ext)) === false) {
                return false;
            }
            if (is_array($mime)) {
                $output = array_merge($output, $mime);
            } else {
                $output[] = $mime;
            }
        }

        return $output;
    }
459060
private function getConfiguration()
    {
        return array_merge(
            [
                'fileMimeTypeField' => false,
                'fileNameField'     => false,
                'filePathField'     => false,
                'fileSizeField'     => false,
            ],
            $this->classMetadata->getExtension(UploadableDriver::EXTENSION_NAME),
            [
                'uploadable'        => true,
                'allowOverwrite'    => $this->allowOverwrite,
                'appendNumber'      => $this->appendNumber,
                'path'              => $this->path,
                'pathMethod'        => $this->pathMethod,
                'callback'          => $this->callback,
                'filenameGenerator' => $this->filenameGenerator,
                'maxSize'           => (float) $this->maxSize,
                'allowedTypes'      => $this->allowedTypes,
                'disallowedTypes'   => $this->disallowedTypes,
            ]
        );
    }
715961
public function findAllWithExtension($extensions)
	{
		$found = [];

		if (!is_array($extensions))
		{
			$extensions = [$extensions];
		}

		foreach ($this->getFlatListOfFiles() as $file)
		{
			$ext = $file->getExtension();
			if (in_array($ext, $extensions))
			{
				$found[] = $file;
			}
		}

		return $found;
	}
712154
private function getOntologyFiles()
    {
        $returnValue = array();

        
        $ext = common_ext_ExtensionsManager::singleton()->getExtensionById($this->options['extension']);
        $returnValue = $ext->getManifest()->getInstallModelFiles();
        

        return (array) $returnValue;
    }
1024884
public function getInstalledExtensionsIds()
    {
        $installData = $this->getExtensionById('generis')->getConfig(self::EXTENSIONS_CONFIG_KEY);
        return is_array($installData) ? array_keys($installData) : array();
    }
862438
public function get_extensions()
    {
        if ($this->exts)
            return $this->exts;

        if (!$this->sieve)
            return $this->_set_error(self::ERROR_INTERNAL);

        $ext = $this->sieve->getExtensions();

        if (is_a($ext, 'PEAR_Error')) {
            return array();
        }

        // we're working on lower-cased names
        $ext = array_map('strtolower', (array) $ext);

        if ($this->script) {
            $supported = $this->script->get_extensions();
            foreach ($ext as $idx => $ext_name)
                if (!in_array($ext_name, $supported))
                    unset($ext[$idx]);
        }

        return array_values($ext);
    }
1372462
public static function getExtensionForType($mime_type) {
		static::ensureDataLoaded();

		if (!static::hasType($mime_type)) {
			return;
		}

		$extensions = static::$mime_types[$mime_type];
		if (is_array($extensions)) {
			return $extensions[0];
		}

		return $extensions;
	}
1325596
protected function variantExtensions()
    {
        $extensions = $this->config->variantExtensions();

        $variants = $this->variantsAttribute();

        if ( ! empty($variants)) {

            foreach ($this->variants() as $variant) {

                $extension = Arr::get($variants, "{$variant}.ext");

                if ($extension) {
                    $extensions[ $variant ] = $extension;
                    continue;
                }
            }
        }

        return $extensions;
    }
307530
public function getExtensionsInfoList()
    {
        $data = json_decode(
            $this->getRemoteContents($this->extensionsInfofoUrl)
        );

        $content = $data->encoding === 'base64' ? base64_decode($data->content) : [];
        return json_decode($content, true);// true to array
    }