for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace League\JsonGuard\Loaders;
use League\JsonGuard;
use League\JsonGuard\Exceptions\SchemaLoadingException;
use League\JsonGuard\Loader;
class FileLoader implements Loader
{
/**
* {@inheritdoc}
*/
public function load($path)
if (!file_exists($path)) {
throw SchemaLoadingException::notFound($path);
}
return JsonGuard\json_decode(file_get_contents($path));