public function addResources($dirs)
    {
        $finder = Finder::create()
            ->files()
            ->filter(function (\SplFileInfo $file) {
                return 2 === substr_count($file->getBasename(), '.') && preg_match('/\.\w+$/', $file->getBasename());
            })
            ->in($dirs)
        ;

        foreach ($finder as $file) {
            list($translationDomain, $locale, $extension) = $foo = explode('.', $file->getBasename(), 3);

            $this->handler->addResource($extension, $file->getPathname(), $locale, $translationDomain);
        }
    }
public function addResources($dirs)
    {
        $finder = Finder::create()
            ->files()
            ->filter(function (\SplFileInfo $file) {
                return 2 === substr_count($file->getBasename(), '.') && preg_match('/\.\w+$/', $file->getBasename());
            })
            ->in($dirs)
        ;

        foreach ($finder as $file) {
            list($translationDomain, $locale, $extension) = $foo = explode('.', $file->getBasename(), 3);

            $this->handler->addResource($extension, $file->getPathname(), $locale, $translationDomain);
        }
    }
public function addResources ( $ dirs ) { $ finder = Finder :: create ( ) -> files ( ) -> filter ( function ( \ SplFileInfo $ file ) { return 2 === substr_count ( $ file -> getBasename ( ) , '.' ) && preg_match ( '/\.\w+$/' , $ file -> getBasename ( ) ) ; } ) -> in ( $ dirs ) ; foreach ( $ finder as $ file ) { list ( $ translationDomain , $ locale , $ extension ) = $ foo = explode ( '.' , $ file -> getBasename ( ) , 3 ) ; $ this -> handler -> addResource ( $ extension , $ file -> getPathname ( ) , $ locale , $ translationDomain ) ; } }
add translation resources

@param string|array  $dirs       A directory path or an array of directories
add translation resources