original_string: public function addStaticInclude($file, $ext = '.js')
      {
          if (@$this->included['js-'.$file.$ext]++) {
              return $this;
          }
  
          if (strpos($file, 'http') !== 0 && $file[0] != '/') {
              $url = $this->app->locateURL('js', $file.$ext);
          } else {
              $url = $file;
          }
  
          $this->app->template->appendHTML(
              'js_include',
              '<script type="text/javascript" src="'.$url.'"></script>'."\n"
          );
  
          return $this;
      }
code: public function addStaticInclude($file, $ext = '.js')
      {
          if (@$this->included['js-'.$file.$ext]++) {
              return $this;
          }
  
          if (strpos($file, 'http') !== 0 && $file[0] != '/') {
              $url = $this->app->locateURL('js', $file.$ext);
          } else {
              $url = $file;
          }
  
          $this->app->template->appendHTML(
              'js_include',
              '<script type="text/javascript" src="'.$url.'"></script>'."\n"
          );
  
          return $this;
      }
code_tokens: public function addStaticInclude ( $ file , $ ext = '.js' ) { if ( @ $ this -> included [ 'js-' . $ file . $ ext ] ++ ) { return $ this ; } if ( strpos ( $ file , 'http' ) !== 0 && $ file [ 0 ] != '/' ) { $ url = $ this -> app -> locateURL ( 'js' , $ file . $ ext ) ; } else { $ url = $ file ; } $ this -> app -> template -> appendHTML ( 'js_include' , '<script type="text/javascript" src="' . $ url . '"></script>' . "\n" ) ; return $ this ; }
docstring: Adds static includes
  
  @param string $file
  @param string $ext
  
  @return $this
docstring_tokens: Adds static includes