original_string: public function generateFilename($name)
      {
          if (substr($name, -4) == '.php') {
              $name = substr($name, 0, -4);
          }
  
          return trim(str_replace(array(DIRECTORY_SEPARATOR, '\\'), '.', trim($name, DIRECTORY_SEPARATOR . '.')), '.')
              . '.html';
      }
code: public function generateFilename($name)
      {
          if (substr($name, -4) == '.php') {
              $name = substr($name, 0, -4);
          }
  
          return trim(str_replace(array(DIRECTORY_SEPARATOR, '\\'), '.', trim($name, DIRECTORY_SEPARATOR . '.')), '.')
              . '.html';
      }
code_tokens: public function generateFilename ( $ name ) { if ( substr ( $ name , - 4 ) == '.php' ) { $ name = substr ( $ name , 0 , - 4 ) ; } return trim ( str_replace ( array ( DIRECTORY_SEPARATOR , '\\' ) , '.' , trim ( $ name , DIRECTORY_SEPARATOR . '.' ) ) , '.' ) . '.html' ; }
docstring: Converts a source file name to the name used for generating the end result.
  
  This method strips down the given $name using the following rules:
  
  * if the $name is suffixed with .php then that is removed
  * any occurrence of \ or DIRECTORY_SEPARATOR is replaced with .
  * any dots that the name starts or ends with is removed
  * the result is suffixed with .html
  
  @param string $name Name to convert.
  
  @return string
docstring_tokens: Converts a source file name to the name used for generating the end result .