21 lines
405 B
PHP
21 lines
405 B
PHP
<?php
|
|
|
|
namespace NoccyLabs\Hotfix\Hotfix\Loader;
|
|
|
|
class HttpLoader implements LoaderInterface
|
|
{
|
|
public function load($fix)
|
|
{
|
|
if (preg_match("/^http[s]?:/", $fix)) {
|
|
$body = file_get_contents($fix);
|
|
return $body;
|
|
}
|
|
return false;
|
|
}
|
|
|
|
public function getInfo()
|
|
{
|
|
return "http(s)://<info>url</info> - Read hotfix from a URL";
|
|
}
|
|
}
|