src/bbn/appui/i18n.php
public function analyze_folder(string $folder = '.', bool $deep = false): array
  {
    $res = [];
		if (  \is_dir($folder) ){

      $files = $deep ? bbn\file\dir::scan($folder, 'file') : bbn\file\dir::get_files($folder);
		  foreach ( $files as $f ){

        $words = $this->analyze_file($f);
        foreach ( $words as $word ){
          if ( !isset($res[$word]) ){
            $res[$word] = [];
          }
          if ( !in_array($f, $res[$word]) ){
            $res[$word][] = $f;
          }
        }
      }
    }
    return $res;
  }
public function analyze_folder(string $folder = '.', bool $deep = false): array
  {
    $res = [];
		if (  \is_dir($folder) ){

      $files = $deep ? bbn\file\dir::scan($folder, 'file') : bbn\file\dir::get_files($folder);
		  foreach ( $files as $f ){

        $words = $this->analyze_file($f);
        foreach ( $words as $word ){
          if ( !isset($res[$word]) ){
            $res[$word] = [];
          }
          if ( !in_array($f, $res[$word]) ){
            $res[$word][] = $f;
          }
        }
      }
    }
    return $res;
  }
public function analyze_folder ( string $ folder = '.' , bool $ deep = false ) : array { $ res = [ ] ; if ( \ is_dir ( $ folder ) ) { $ files = $ deep ? bbn \ file \ dir :: scan ( $ folder , 'file' ) : bbn \ file \ dir :: get_files ( $ folder ) ; foreach ( $ files as $ f ) { $ words = $ this -> analyze_file ( $ f ) ; foreach ( $ words as $ word ) { if ( ! isset ( $ res [ $ word ] ) ) { $ res [ $ word ] = [ ] ; } if ( ! in_array ( $ f , $ res [ $ word ] ) ) { $ res [ $ word ] [ ] = $ f ; } } } } return $ res ; }
Returns an array containing the strings found in the given folder

@param string $folder
@param boolean $deep
@return array
Returns an array containing the strings found in the given folder