Initial commit

This commit is contained in:
Christopher Vagnetoft
2016-04-19 15:54:03 +02:00
commit c378d62ccb
20 changed files with 1132 additions and 0 deletions

View File

@ -0,0 +1,18 @@
<?php
namespace NoccyLabs\Hotfix\Hotfix\Loader;
class FileLoader implements LoaderInterface
{
public function load($fix)
{
if ($fix[0] !== '/') {
$fix = getcwd()."/".$fix;
}
if (file_exists($fix)) {
$hotfix = file_get_contents($fix);
return $hotfix;
}
return false;
}
}

View File

@ -0,0 +1,13 @@
<?php
namespace NoccyLabs\Hotfix\Hotfix\Loader;
class GistLoader implements LoaderInterface
{
public function load($fix)
{
if (!preg_match('/^gist\:/i', $fix)) {
return false;
}
}
}

View File

@ -0,0 +1,11 @@
<?php
namespace NoccyLabs\Hotfix\Hotfix\Loader;
class HttpLoader implements LoaderInterface
{
public function load($fix)
{
return false;
}
}

View File

@ -0,0 +1,8 @@
<?php
namespace NoccyLabs\Hotfix\Hotfix\Loader;
interface LoaderInterface
{
public function load($fix);
}

View File

@ -0,0 +1,13 @@
<?php
namespace NoccyLabs\Hotfix\Hotfix\Loader;
class PastebinLoader implements LoaderInterface
{
public function load($fix)
{
if (!preg_match('/^pastebin\:/i', $fix)) {
return false;
}
}
}