php-hotfix/src/Hotfix/Loader/HttpLoader.php

21 lines
405 B
PHP
Raw Normal View History

2016-04-19 13:54:03 +00:00
<?php
namespace NoccyLabs\Hotfix\Hotfix\Loader;
class HttpLoader implements LoaderInterface
{
public function load($fix)
{
2016-04-19 14:37:31 +00:00
if (preg_match("/^http[s]?:/", $fix)) {
$body = file_get_contents($fix);
return $body;
}
2016-04-19 13:54:03 +00:00
return false;
}
2016-04-19 20:55:09 +00:00
public function getInfo()
{
return "http(s)://<info>url</info> - Read hotfix from a URL";
}
2016-04-19 13:54:03 +00:00
}