protected function collectExtensions($name)
    {

        $extensions = [];

        foreach ($this->extensions() as $pattern) {
            if ($this->patternMatches($pattern, $name)) {
                $extensions[] = $this->getExtension($pattern);
            }
        }

        return $extensions;

    }
protected function collectExtensions($name)
    {

        $extensions = [];

        foreach ($this->extensions() as $pattern) {
            if ($this->patternMatches($pattern, $name)) {
                $extensions[] = $this->getExtension($pattern);
            }
        }

        return $extensions;

    }
protected function collectExtensions ( $ name ) { $ extensions = [ ] ; foreach ( $ this -> extensions ( ) as $ pattern ) { if ( $ this -> patternMatches ( $ pattern , $ name ) ) { $ extensions [ ] = $ this -> getExtension ( $ pattern ) ; } } return $ extensions ; }
This method is for collecting extensions WHICH NAMES are patterns.

@param string $name

@return array
This method is for collecting extensions WHICH NAMES are patterns .