19 lines
360 B
PHP
19 lines
360 B
PHP
|
<?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;
|
||
|
}
|
||
|
}
|