2016-04-19 13:54:03 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace NoccyLabs\Hotfix\Hotfix\Loader;
|
|
|
|
|
|
|
|
class GistLoader implements LoaderInterface
|
|
|
|
{
|
|
|
|
public function load($fix)
|
|
|
|
{
|
|
|
|
if (!preg_match('/^gist\:/i', $fix)) {
|
|
|
|
return false;
|
|
|
|
}
|
2016-04-19 14:30:47 +00:00
|
|
|
|
|
|
|
$url = "https://gist.githubusercontent.com/" . substr($fix, 5) . "/raw";
|
|
|
|
|
|
|
|
return file_get_contents($url);
|
|
|
|
|
2016-04-19 13:54:03 +00:00
|
|
|
}
|
|
|
|
}
|