[ Index ]

PHP Cross Reference of MediaWiki-1.24.0

title

Body

[close]

/extensions/LocalisationUpdate/fetcher/ -> FetcherFactory.php (source)

   1  <?php
   2  /**
   3   * @file
   4   * @author Niklas Laxström
   5   * @license GPL-2.0+
   6   */
   7  
   8  /**
   9   * Constructs fetchers based on the repository urls.
  10   */
  11  class LU_FetcherFactory {
  12  	public function getFetcher( $path ) {
  13  
  14          if ( strpos( $path, 'https://raw.github.com/' ) === 0 ) {
  15              return new LU_GitHubFetcher();
  16          } elseif ( strpos( $path, 'http://' ) === 0 ) {
  17              return new LU_HttpFetcher();
  18          } elseif ( strpos( $path, 'https://' ) === 0 ) {
  19              return new LU_HttpFetcher();
  20          } else {
  21              return new LU_FileSystemFetcher();
  22          }
  23      }
  24  }


Generated: Fri Nov 28 14:03:12 2014 Cross-referenced by PHPXref 0.7.1