src/ScContent/Service/FileTypesCatalog.php
protected function findByType($pattern, $part)
    {
        if (! is_array($pattern)) {
            $pattern = [$pattern];
        }
        $needle = 0;
        foreach ($pattern as $term) {
            $needle |= $term;
        }
        $matches = [];
        foreach ($this->catalogue as $spec => $features) {
            if ($needle === ($features & $needle)) {
                $props = explode(':', $spec);
                $matches[] = $props[$part];
            }
        }
        return array_unique($matches);
    }
protected function findByType($pattern, $part)
    {
        if (! is_array($pattern)) {
            $pattern = [$pattern];
        }
        $needle = 0;
        foreach ($pattern as $term) {
            $needle |= $term;
        }
        $matches = [];
        foreach ($this->catalogue as $spec => $features) {
            if ($needle === ($features & $needle)) {
                $props = explode(':', $spec);
                $matches[] = $props[$part];
            }
        }
        return array_unique($matches);
    }
protected function findByType ( $ pattern , $ part ) { if ( ! is_array ( $ pattern ) ) { $ pattern = [ $ pattern ] ; } $ needle = 0 ; foreach ( $ pattern as $ term ) { $ needle |= $ term ; } $ matches = [ ] ; foreach ( $ this -> catalogue as $ spec => $ features ) { if ( $ needle === ( $ features & $ needle ) ) { $ props = explode ( ':' , $ spec ) ; $ matches [ ] = $ props [ $ part ] ; } } return array_unique ( $ matches ) ; }
Each new term does not extend the search results,
but makes them more specific.

@param  integer|array $pattern
@param  integer $part <code>0</code> for extension, <code>1</code> for mime
@return array
Each new term does not extend the search results but makes them more specific .