%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /www/varak.net/wiki.varak.net/extensions/LocalisationUpdate/includes/fetcher/
Upload File :
Create Path :
Current File : /www/varak.net/wiki.varak.net/extensions/LocalisationUpdate/includes/fetcher/FetcherFactory.php

<?php
/**
 * @file
 * @author Niklas Laxström
 * @license GPL-2.0-or-later
 */

namespace LocalisationUpdate;

/**
 * Constructs fetchers based on the repository urls.
 */
class FetcherFactory {
	public function getFetcher( $path ) {
		if ( strpos( $path, 'https://raw.github.com/' ) === 0 ) {
			return new GitHubFetcher();
		} elseif ( strpos( $path, 'http://' ) === 0 ) {
			return new HttpFetcher();
		} elseif ( strpos( $path, 'https://' ) === 0 ) {
			return new HttpFetcher();
		} else {
			return new FileSystemFetcher();
		}
	}
}

Zerion Mini Shell 1.0