original_string: public function load($class)
      {
          $path = str_replace('\\', DS, $class);
          $path = '##replace##/' . trim($path, DS) . '.php';
          $path = str_replace('/', DS, $path);
  
          foreach ($this->getLocations() as $subPath) {
              $actualPath = str_replace('##replace##', $subPath, $path);
              if (file_exists($actualPath)) {
                  require_once $actualPath;
                  return true;
              }
          }
          return false;
      }
code: public function load($class)
      {
          $path = str_replace('\\', DS, $class);
          $path = '##replace##/' . trim($path, DS) . '.php';
          $path = str_replace('/', DS, $path);
  
          foreach ($this->getLocations() as $subPath) {
              $actualPath = str_replace('##replace##', $subPath, $path);
              if (file_exists($actualPath)) {
                  require_once $actualPath;
                  return true;
              }
          }
          return false;
      }
code_tokens: public function load ( $ class ) { $ path = str_replace ( '\\' , DS , $ class ) ; $ path = '##replace##/' . trim ( $ path , DS ) . '.php' ; $ path = str_replace ( '/' , DS , $ path ) ; foreach ( $ this -> getLocations ( ) as $ subPath ) { $ actualPath = str_replace ( '##replace##' , $ subPath , $ path ) ; if ( file_exists ( $ actualPath ) ) { require_once $ actualPath ; return true ; } } return false ; }
docstring: Attempts to load the class if it exists.
  
  @param string $class
  
  @return bool
docstring_tokens: Attempts to load the class if it exists .