Initial commit
This commit is contained in:
18
src/Hotfix/Loader/FileLoader.php
Normal file
18
src/Hotfix/Loader/FileLoader.php
Normal 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;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user