original_string: public function getProfile($name) {
      $dirs = $this->config['profile.dirs'];
      foreach ($dirs as $dir) {
        if (!is_dir($dir) || !is_readable($dir)) {
          continue;
        }
        $filename = $dir . DIRECTORY_SEPARATOR . $name . '.profile';
        if (is_readable($filename)) {
          $content = file_get_contents($filename);
          $json = json_decode($content);
          return $json;
        }
      }
      throw new \Exception("Profile $name not found");
    }
code: public function getProfile($name) {
      $dirs = $this->config['profile.dirs'];
      foreach ($dirs as $dir) {
        if (!is_dir($dir) || !is_readable($dir)) {
          continue;
        }
        $filename = $dir . DIRECTORY_SEPARATOR . $name . '.profile';
        if (is_readable($filename)) {
          $content = file_get_contents($filename);
          $json = json_decode($content);
          return $json;
        }
      }
      throw new \Exception("Profile $name not found");
    }
code_tokens: public function getProfile ( $ name ) { $ dirs = $ this -> config [ 'profile.dirs' ] ; foreach ( $ dirs as $ dir ) { if ( ! is_dir ( $ dir ) || ! is_readable ( $ dir ) ) { continue ; } $ filename = $ dir . DIRECTORY_SEPARATOR . $ name . '.profile' ; if ( is_readable ( $ filename ) ) { $ content = file_get_contents ( $ filename ) ; $ json = json_decode ( $ content ) ; return $ json ; } } throw new \ Exception ( "Profile $name not found" ) ; }
docstring: Read the video profile in given profile directories
  
  @param string $name Profile name
  @return object Profile
  @throws Exception
docstring_tokens: Read the video profile in given profile directories