original_string: protected static function _findPlugin($name)
      {
          $output = null;
          $paths  = App::path('Plugin');
          $plugin = Configure::read('plugins.' . $name);
  
          if ($plugin !== null) {
              return $plugin;
          }
  
          foreach ($paths as $path) {
              $plgPath = $path . $name . DS;
              if (FS::isDir($plgPath)) {
                  $output = $plgPath;
                  break;
              }
          }
  
          return $output;
      }
code: protected static function _findPlugin($name)
      {
          $output = null;
          $paths  = App::path('Plugin');
          $plugin = Configure::read('plugins.' . $name);
  
          if ($plugin !== null) {
              return $plugin;
          }
  
          foreach ($paths as $path) {
              $plgPath = $path . $name . DS;
              if (FS::isDir($plgPath)) {
                  $output = $plgPath;
                  break;
              }
          }
  
          return $output;
      }
code_tokens: protected static function _findPlugin ( $ name ) { $ output = null ; $ paths = App :: path ( 'Plugin' ) ; $ plugin = Configure :: read ( 'plugins.' . $ name ) ; if ( $ plugin !== null ) { return $ plugin ; } foreach ( $ paths as $ path ) { $ plgPath = $ path . $ name . DS ; if ( FS :: isDir ( $ plgPath ) ) { $ output = $ plgPath ; break ; } } return $ output ; }
docstring: Find plugin dir in registered paths.
  
  @param string $name
  @return null|string
docstring_tokens: Find plugin dir in registered paths .